Find Biggest of 3 Numbers: C++


Video tutorial to find the biggest of the three integer numbers in C++, using if-else control statements.

Full Source Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include<iostream .h>
#include<conio .h>
 
void main()
{
int a, b, c;
clrscr();
 
cout< <"Enter 3 no\n";
cin>>a>>b>>c;
 
int big;
 
if( a > b )
 big = a;
else
{
 if( b > c )
  big = b;
 else
  big = c;
}
cout< <"\nBiggest is: "<<big;
getch();
}

In this program we get three integer variables from the user.
If value of variable a is bigger, then we store it inside the variable big; else we compare b with c. Now will store the biggest number inside the variable big.
Video Tutorial: Biggest of 3 Integer Numbers


[youtube https://www.youtube.com/watch?v=YRkCpS_GMFw]

YouTube Link: https://www.youtube.com/watch?v=YRkCpS_GMFw [Watch the Video In Full Screen.]



Output
Enter 3 no’s
404
501
301
Biggest is: 501

One thought on “Find Biggest of 3 Numbers: C++”

Leave a Reply

Your email address will not be published. Required fields are marked *