C++ Programming Code Examples C++ > Beginners Lab Assignments Code Examples Find Largest of Three Numbers Find Largest of Three Numbers To find the largest number among the three numbers in C++ programming, you have to ask to the user to enter the three numbers, now start checking which one is the largest number. After finding the largest, display that number as the largest number among the three numbers on the output screen as shown here in the following program. Following C++ program ask to the user to enter the three numbers to check which one is the largest or the biggest one of the three numbers, then display the result on the screen : #include<iostream.h> #include<conio.h> void main() { clrscr(); int a, b, c, big; cout<<"Enter three numbers : "; cin>>a>>b>>c; //let a is the biggest big=a; if(big<b) { if(b>c) { big=b; } else { big=c; } } else if(big<c) { if(c>b) { big=c; } else { big=b; } } else { big=a; } cout<<"Biggest number is "<<big; getch(); }