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

what are the iterator and generic algorithms.

1571


Is c++ platform dependent?

727


What happens if a pointer is deleted twice?

905


give me an example for testing a program showing the test path .show how the test is important and complex.

2536


Why is main an int?

620






Why are pointers used?

654


Explain one method to process an entire string as one unit?

1089


Can I create my own functions in c++?

699


What are c++ data types?

734


What are 2 ways of exporting a function from a dll?

715


How would you find out if a linked-list is a cycle or not?

642


Describe private, protected and public?

687


Write a program in C++ for Fibonacci series

757


What is the basic structure of c++ program?

662


How do we balance an AVL Tree in C++?

733