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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Is there a difference between class and struct?

954


What is c++ virtual inheritance?

1072


What are friend classes?

1015


How to improve object oriented design skills?

946


When do we run a shell in the unix system?

1015


What is the main use of c++?

1059


What is the use of endl in c++ give an example?

1102


Discussion on error handling of C++ .

1065


What is a class in C++?

1200


Differentiate between a constructor and a method in C++.

991


What is the advantage of c++ over c?

967


What does h mean in maths?

1103


Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?

4677


Keyword mean in declaration?

1001


Why is encapsulation used?

947