Question
Can someone convert to pseudo code and can you tell me why this program will start and allow me to enter the 2 numbers, but
Can someone convert to pseudo code and can you tell me why this program will start and allow me to enter the 2 numbers, but it does not compare them or produce the output message?
(Smallest of Two Numbers) Write a program that defines and uses macro MINIMUM2 to determine the smallest of two numeric values. Input the values from the keyboard
#include
// Macro definition
#define MINIMUM2(x,y)(((x)<(y))?x:y)
//begin main
int main()
{
//define variables
int one, two;
//Prompt user to enter 2 numbers for comparison
printf("Enter the 2 numbers to be compared: ");
//Read input
scanf("%d %d ",&one,&two);
//Print smallest number result
printf("The smallest of the 2 numbers %d and %d is: %d", one, two, MINIMUM2(one,two));
return 0;
}//End main
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started