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 |
What are string library functions(syntax).
What is the difference between realloc() and free() in C++?
What is partial specialization or template specialization?
dynamic scoping is
Write a program that ask for user input from 5 to 9 then calculate the average
How to convert integer to string in C++
To solve the 8 Queens problem, which algorithm is used?
Write a C++ Program to Find Sum and Average of n numbers using for loop.
What is the difference between member functions and static member functions?
Find the Factorial of a number using a program.
What Are The Differences Between A C++ Struct And C++ Class?
Write a program to generate the Fibonocci Series in C++.