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

Name the operators that cannot be overloaded.

1 Answers   Wipro,


What is function overloading and operator overloading in C++?

0 Answers   IBS, TCS,


Identify the errors in the following program. #include <iostream> using namespace std; void main() { int i=5; while(i) { switch(i) { default: case 4: case 5: break; case 1: continue; case 2: case 3: break; } i-; } }

1 Answers  


How to run C++ program in cmd

0 Answers  


What kind of problems does name mangling cause?

0 Answers   Amazon,


What is the difference between realloc() and free() in C++?

0 Answers   IBS, TCS,


What are string library functions(syntax).

0 Answers   Accenture,


What are Agilent PRECOMPILERS?

0 Answers   Agilent,


What is Boyce Codd Normal form?

0 Answers   IBS,


Identify the error in the following program. #include<iostream.h> void main() { int i = 0; i = i + 1; cout « i « " "; /*comment *//i = i + 1; cout << i; }

1 Answers  


What is the 4 difference between delete[] and delete?

0 Answers   Alter,


Write a program that can take input from 3 to 8 and calculate the average?

0 Answers   Accenture,


Categories