write a program that takes two numbers from user that
prints the smallest number
Answer Posted / vaishnavi
#include<iostream.h>
void main()
{
int a,b;
cout<<"Enter two numbers";
cin>>a>>b;
if(a>b)
cout<<a<<"is greater";
else
cout<<b<<is greater";
}
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is the use of typedef?
What is ostream in c++?
What is :: operator in c++?
Can we define function inside main in c++?
Why main function is special in c++?
What are files in c++?
What is pointer with example?
How do c++ struct differs from the c++ class?
How delete [] is different from delete?
What is the difference between an external iterator and an internal iterator?
Difference between Abstraction and encapsulation in C++?
How can you create a virtual copy constructor?
What do you mean by friend class & friend function in c++?
What are iterators in c++?
Write about the access privileges in c++ and also mention about its default access level?