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 are the major differences between C and C++?

0 Answers   Amazon,


What do you by Function Overloading in C++?

0 Answers   Akamai Technologies, Infogain,


What is conversion constructor in C++

0 Answers   TCS,


What does malloc return in C and C++?

0 Answers   Alter,


Difference between Call by pointer and by reference.

0 Answers   Adobe,


Implement a 2D bit-matrix representing monochrome pixels which will have only OFF/ON values and will take on an average only one bit of memory for each stored bit. How to perform various operations on it?

0 Answers   Adobe,


Declare a pointer to a function that takes a char pointer as argument and returns a void pointer.

0 Answers   Alter,


Difference between function overloading and function overriding.

0 Answers   Alter,


Explain the difference between method overriding and method overloading in C++?

0 Answers   Accenture,


What is bool in C++

0 Answers  


What is the difference between member functions and static member functions?

0 Answers   Alter,


How do you work around them?

0 Answers   Amazon,


Categories