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
What are arithmetic operators?
Can you pass a vector to a function?
Describe about storage allocation and scope of global, extern, static, local and register variables?
What is the difference between structure and class?
Explain the volatile and mutable keywords.
What are the steps in the development cycle?
Will this c++ program execute or not?
What are arrays c++?
Define 'std'.
What are the 3 levels of programming languages?
What is the use of 'using' declaration in c++?
Do you know what is overriding?
What is the type of 'this' pointer? When does it get created?
What is the difference between a baller and a reference in C++?
If a function doesn’t return a value, how do you declare the function?