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 does stack look in function calls? When does stack overflow? What can you do to remedy it?

0 Answers   Adobe,


What is static variable and difference between(const char *p,char const *p,const char* const p).

0 Answers   Accenture,


Explain about Searching and sorting algorithms with complexities

0 Answers   Accenture,


Write a C++ Program to Find Sum and Average of three numbers.

1 Answers  


Tell us the size of a float variable.

0 Answers   Accenture,


Execute the qsort () in c/sort() in c++ library or your own custom sort which will sort any type of data on user defined criteria.

0 Answers   Adobe,


How will you execute a stack using a priority queue? (Push and pop should be in O (1)).

0 Answers   Adobe,


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

0 Answers   Amazon,


CDPATH shell variable is in(c-shell)

0 Answers   Siemens,


Can we provide one default constructor for our class?

0 Answers  


If class D is derived from a base class B

0 Answers  


What is Advantage and Use of THIS pointer in C++ – Scenarios?

0 Answers  


Categories