Programming in C
Programming in C
4th Edition
ISBN: 9780321776419
Author: Stephen G. Kochan
Publisher: Addison-Wesley
Question
Book Icon
Chapter 12, Problem 4E
Program Plan Intro

Program Plan:

  • Include the necessary header files into program.
  • Define the macro named “MAX3()” to find out the maximum value of three numbers.
  • Define the main function
    • Declare the variable “x”, “y”, and “z” in type of integer.
    • Prompt and get the value of “x”, “y”, and “z” from user.
    • Call the macro “MAX3()”  in print function which passes “x”, “y”, and “z” as argument and print the resultant value.

Blurred answer
Students have asked these similar questions
Write a C Program that defines and uses a macro that calculates the minimum of 2 integers. Then, extend this program with another macro to calculate the minimum of 4 integers. This extended program must use the macro, which calculates the minimum of 2 integers.  The program should get the input of 4 integers and print the minimum value as the result.   The approach must use macros.   For example: Input Result 100 200 300 400 100
Write a c++  program to print the area of a square (Area = s2, where a is the length of s side which will be given during the run-time) A. Use a parameterized macro for finding the square of a number with symbol SQR B. Use a parameterized/nested macro for finding the area of the square with symbol AREA
Let f2(x) be the smallest number n such that x < n2. Write a program in S that computes f2. If you use any macro, you have to provide the corresponding macro expansion. This question is related to theory of computation and I don't need any answer in C, C++ or any other programming language.
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education