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

Tell us the size of a float variable.

0 Answers   Accenture,


Write a C++ Program to Find whether given Number is Odd or Even.

1 Answers  


What is a virtual base class?

6 Answers   Fidelity, Siemens,


How can you force the compiler to not generate them?

0 Answers   Amazon,


Is there a difference between class and struct?

0 Answers  


What is the difference between Stack and Queue in C++?

0 Answers   Global Logic, iNautix,


When must you use a constructor initializer list?

0 Answers   Amazon,


What does it mean to declare a member function as static in C++?

0 Answers   Amazon,


Tell How To Check Whether A Linked List Is Circular ?

1 Answers   IBS, Infosys,


C++ supports multiple inheritance. What is the “diamond problem” that can occur with multiple inheritance? Give an example.

0 Answers  


What is pass by value & reference.

0 Answers   Accenture,


What is name mangling/name decoration?

0 Answers   Amazon,


Categories