Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant B. Navathe

7th Edition Global Edition

1292097612, 978-1292097619

More Books

Students also viewed these Databases questions

Question

Know the three main dimensions of the service environment.

Answered: 1 week ago