Q) Write a program to read two numbers from the keyboard and display the largest value of them?
Answer:
// if-else structure
#include <iostream.h>
void main (void)
{
float x,y;
cout << “Enter any two numbers \n”;
cin >> x >> y;
if(x>y)
cout << “Largest value is ” << x << endl;
else
cout << “Largest value is ” << v << endl;
}
