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

Can we change the basic meaning of an operator in c++?

655


What are the vectors in c++?

582


What can I safely assume about the initial values of variables which are not explicitly initialized?

627


How can I learn c++ easily?

624


What is std namespace in c++?

726






Explain what are mutator methods in c++?

572


What is the main use of c++?

557


What is the difference between the compiler and the preprocessor?

619


How can you create a virtual copy constructor?

587


Name the debugging methods that are used to solve problems?

583


What is the protected keyword used for?

618


Can constructor be static in c++?

643


How do I use arrays in c++?

585


What is const pointer and const reference?

597


What is vector processing?

670