Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / vaishnavi

#include<iostream.h>
void main()
{
int a,b;
cout<<"Enter two numbers";
cin>>a>>b;
if(a>b)
cout<<a<<"is greater";
else
cout<<b<<is greater";
}

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More C++ General Interview Questions

What is the difference between public and private data members?

0 Answers  


Explain Memory Allocation in C/C++ ?

0 Answers   Infosys,


What does flush do c++?

0 Answers  


What are the types of container classes?

0 Answers  


Write any small program that will compile in "C" but not in "C++"

10 Answers   Honeywell,


Explain data encapsulation?

0 Answers  


What is the difference between shallow copy and deep copy?

1 Answers  


What is a c++ class?

0 Answers  


What are friend functions?

1 Answers  


When a function is made inline. Write the situation where inline functions may not work.

2 Answers  


How does list r; differs from list r();?

0 Answers  


What is size of Empty Class?

3 Answers   Persistent,


Categories