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

what is multi-threading in C++?

599


which operator is used for performing an exponential operation a) > b) ^ c) none

594


Explain what are single and multiple inheritances in c++?

553


What is switch case in c++ syntax?

608


What is the difference between a reference and a pointer?

583






To what does “event-driven” refer?

595


Explain the use of this pointer?

622


Explain pass by value and pass by reference.

581


Are php strings immutable?

544


How do you compile the source code with your compiler?

598


Are strings immutable in c++?

637


What is == in programming?

604


Why pointer is used in c++?

597


What is c++ stringstream?

589


Which is the best c++ compiler for beginners?

548