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

What is basic if statement syntax?

1094


What is encapsulation in ict?

1062


Can we provide one default constructor for our class?

689


How to delete array of objects in C++? Proof by C++ code for proper deletion

864


Explain polymorphism?

1083


What is the difference between strcpy() and strncpy()?

1145


Does c++ have finally?

1041


We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?

1083


What is private, public and protected inheritance?

1090


What is a character in c++?

1050


Difference between delete and free.

1081


What is latest update of C++ ?

1090


What is polymorphism and example?

1054


What is data binding in c++?

962


Arrange Doubly linked list in the ascending order of its integral value and replace integer 5 with 7?

4123