- Home
- Course Category
- Course Result
- Course Detail
Hot Line: 0124-2383121
Course Introduction
Programs for practice
In the program below, we've taken two numbers from user and printed larger number in C++
Source Code: Find Largest of Two Numbers
/* C++ Program - Find Largest of Two Numbers */
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a, b, big;
cout<<"Enter two numbers : ";
cin>>a>>b;
if(a>b)
{
large=a;
}
else
{
large=b;
}
cout<<"larger of the two number is "<<large;
getch();
}
Output
Enter two numbers:
2
4
larger of the two number is 4