C++ Program To Find Largest Among Two Numbers

This program is to find biggest of two numbers.


2.Get the inputs from user for variables a, b (ie) two integer numbers
3.Compare whether value of a is greater than the value of b
4.If step-3 is true print a "Is Greater Than" b else print b "Is Greater Than" a


# include <iostream.h>
# include <conio.h>
void main ()
           int a, b;
           cout << "Enter The Value For A:";
           cin >> a;
           cout << "Enter The Value For B:";
           cin >> b;
           if (a> b)
                     cout << a << "Is Greater Than" << b;
                       cout << b << "Is Greater Than" << a;
             getch ();

Manish Jain

Manish Jain is an indian blogger who loves to learn and find out interesting tweaks and tricks on pc and smartphones and share them with world .