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 ? | 1 Yes | 0 No |
In C++ what is a vtable and how does it work?
What Are The Differences Between A C++ Struct And C++ Class?
What is pass by value & reference.
What is placement new?
What is conversion constructor in C++
Discuss about iteration statements in C++ .
How to invoke a C function using a C++ program?
Define an Abstract class in C++?
How does stack look in function calls? Write a recursive function call, how will the stack look like?
Write a C++ Program to Find Sum and Average of n numbers using for loop.
Write a C++ Program to Display Number (Entered by the User).
Discuss the role of C++ shorthands.