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

How to generate random numbers in C++ with a range?

0 Answers  


Is there a difference between class and struct?

0 Answers  


Write a C++ Program to Check Whether a character is Vowel or Consonant.

2 Answers  


What is pass by value & reference.

0 Answers   Accenture,


Write a C++ Program to find Addition of Two Numbers.

1 Answers  


How will you print a list of all unique words from a string which may contain repeated words?

0 Answers   Adobe,


What is C++11?

1 Answers   Adobe,


In C++ what is the meaning of data hiding?

0 Answers   Aricent,


When would you choose to return an error code rather than throw an exception?

0 Answers   Amazon,


Is deconstructor overloading possible? If yes then explain and if no Then why?

1 Answers  


Do you know about Agilent PRECOMPILERS. ?

0 Answers   Agilent,


What are the major differences between C and C++?

0 Answers   Amazon,


Categories