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 |
How does stack look in function calls? When does stack overflow? What can you do to remedy it?
What is static variable and difference between(const char *p,char const *p,const char* const p).
Explain about Searching and sorting algorithms with complexities
Write a C++ Program to Find Sum and Average of three numbers.
Tell us the size of a float variable.
Execute the qsort () in c/sort() in c++ library or your own custom sort which will sort any type of data on user defined criteria.
How will you execute a stack using a priority queue? (Push and pop should be in O (1)).
What are the major differences between C and C++?
CDPATH shell variable is in(c-shell)
Can we provide one default constructor for our class?
If class D is derived from a base class B
What is Advantage and Use of THIS pointer in C++ – Scenarios?