Write a program to read two numbers from the keyboard and display the larger value on the screen
#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 |
Name the operators that cannot be overloaded.
What is function overloading and operator overloading in C++?
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-; } }
How to run C++ program in cmd
What kind of problems does name mangling cause?
What is the difference between realloc() and free() in C++?
What are string library functions(syntax).
What are Agilent PRECOMPILERS?
What is Boyce Codd Normal form?
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; }
What is the 4 difference between delete[] and delete?
Write a program that can take input from 3 to 8 and calculate the average?