C++ Programming Code Examples C++ > Beginners Lab Assignments Code Examples Find Largest of Two Number Find Largest of Two Number To find the largest number of the two number in C++ programming, you have to ask to the user to enter the two number to start checking which one is larger to display the largest number on the output screen as shown here in the following program. Following C++ program ask to the user to enter the two number to find the greatest or largest of the two number, then display the result on the screen: #include<iostream.h> #include<conio.h> void main() { clrscr(); int a, b, big; cout<<"Enter two number : "; cin>>a>>b; if(a>b) { big=a; } else { big=b; } cout<<"Biggest of the two number is "<<big; getch(); }