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 are default parameters? How are they evaluated in c++ function?

763


Difference between inline functions and macros?

672


What is virtual destructor ans explain its use?

707


I want explanation for this assignment: how to connect mysql database using c/c++,please explain this detailly?

1661


Why Pointers are not used in C++?

698






Why do we learn c++?

622


What is a v-table?

753


What is c++ and its features?

650


What are the syntactic rules to be avoid ambiguity in multiple inheritance?

755


Can the creation of operator** is allowed to perform the to-the-power-of operations?

661


What is the use of volatile variable?

685


Describe the process of creation and destruction of a derived class object?

737


Where do I find the current c or c++ standard documents?

685


What are the data types in c++?

604


Does there exist any other function which can be used to convert an integer or a float to a string?

728