write a program that takes two numbers from user that
prints the smallest number

Answer Posted / hemant jakkani

#include <stdio.h>
#include <string.h>

main()
{
int x,y;
scanf("%d%d",&x,&y);
if(x>y)
printf("First Number is greater: %d",x);
else
printf("Second Number is greater:%d",y);
}

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we learn c++?

729


Why is c++ not purely object oriented?

764


why is c++ called oops? Explain

799


Who created c++?

785


How many standards of c++ are there?

838


Will the following program execute?

785


What is the output of the following program? Why?

819


Explain virtual class and friend class.

798


What is abstraction with real time example?

872


Describe new operator?

847


How do you clear a buffer in c++?

723


What are the important differences between c++ and java?

832


What is the use of seekg in c++?

796


What is a breakpoint?

768


What is :: operator in c++?

791