3- Write a program to find larger and smaller of the two
numbers.

Answer Posted / tcs

#include<iostram.h>
void main()
{
int a,b,c;
cout<<"enter two num";
cin>>a>>b;
if(a>b)
{
cout<<"a is greater"<<a;
}
else
{
cout<<"a is small"<<a;
}
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what data encapsulation is in c++?

579


How do you clear a set in c++?

605


How would you use the functions sin(), pow(), sqrt()?

743


Define virtual constructor.

643


What is the maximum value of a unsigned char a) 255 b) 256 c) 128

637






What do you mean by public protected and private in c++?

605


What is the use of main function in c++?

532


Explain the virtual inheritance in c++.

603


Is c++ the hardest programming language?

644


What is a tuple c++?

550


Why was c++ created?

560


Describe the advantage of an external iterator.

621


What is ifstream c++?

566


If dog is a friend of boy, and terrier derives from dog, is terrier a friend of boy?

620


How to tokenize a string in c++?

607