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 to read two numbers from the keyboard and display the larger value on the screen



Write a program to read two numbers from the keyboard and display the larger value on the screen..

Answer / hr

#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
float a,b;
cout<<" Enter two values :"<<endl;
cin>>a>>b;
if(a>b)
cout<<" larger value = "<<a<<endl;
else
cout<<" larger value = "<<b<<endl;
return 0;
}
OUTPUT:
Enter two values:10 20
Larger value:20

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More C++ Interview Questions

What is placement new?

1 Answers   Amazon,


How does free know the size of memory to be deleted

0 Answers  


Explain the importance of method overloading in C++?

0 Answers   Akamai Technologies, Infogain,


Tell us the size of a float variable.

0 Answers   Accenture,


Difference between Call by pointer and by reference.

0 Answers   Adobe,


What is the difference between an ARRAY and a LIST in C++?

1 Answers   IBS, TCS,


What Is Polymorphism in C++ ?

2 Answers   IBS, Impetus, ITC Indian Tobacco Company, Motorola,


explain the term 'resource acquisition is initialization'?

0 Answers   Amazon,


What are the advantages/disadvantages of using inline and const?

0 Answers   Amazon,


How to input string in C++

0 Answers  


Factory Method C++ – How to delete pointers returned by it

0 Answers  


what is friend function in C++?

0 Answers   TCS,


Categories