/*C++ program to find greatest of three numbers using if-else-if*/

#include<iostream.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
cout<<“enter the values of a,b,c:”;
cin>>a>>b>>c;
if(a>b&&a>c);
{
cout<<“a is greater”;
}
else if(b>c)
{
cout<<“b is greater”;
}
else
{
cout<<“c is greater”;
}
getch();
}

67,853 total views, 30 views today

Get Free Email Updates..!
Join us for FREE to get instant email updates..! GobsInfo- Everything Unlimited
We hate spam. Your email address will not be sold or shared with anyone else.

5,264 Thoughts to “C++ program to find greatest of three numbers using if-else-if”

  1. I was suggested this website by my cousin. I’m not sure whether this post is written by him as nobody else know such detailed about my problem. You’re amazing! Thanks!

Leave a Comment