Resources » Articles/Knowledge Sharing » Computer & Technology

PROGRAM OF C++ find greatest of three numbers.


Updated: Category: Computer & Technology
Author: Member Level: SilverPoints: 2


Program. To find greatest of three numbers.



1. Prog. To find greatest of three numbers.

#include
#include
void main()
{
clrscr();
int a,b,c;
cout<<"\n\tEnter the first number :";
cin>>a;
cout<<"\n\tEnter the second number :";
cin>>b;
cout<<"\n\tEnter the third number :";
cin>>c;
if(a>b && a>c)
{
cout<<"\n\tFirst number is greatest";
}
if(b>a && b>c)
{
cout<<"\n\tSecond number is greatest";
}
if(c>a && c>b)
{
cout<<"\n\tThird number is greatest";
}
getch();
}



OUTPUT

Enter the first number:2

Enter the second number:3

Enter the third number:4

Third number is greatest_


Did you like this resource? Share it with your friends and show your love!




Responses to "PROGRAM OF C++ find greatest of three numbers."
Guest Author: deepikani   10 Aug 2013
Its very useful to me. thank you so much.


Feedbacks      

Post Comment:




  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:   Sign In to fill automatically.
    Email: (Will not be published, but required to validate comment)



    Type the numbers and letters shown on the left.


    Submit Article     Return to Article Index
    Complete the action items below to enter to win an iPad Mini from India Study Channel! in India Study Channel - Locker on LockerDome
    Awards & Gifts
    Active Members
    TodayLast 7 Daysmore...

     
    ISC Technologies, Kochi - India. © All Rights Reserved.

    
    
    
    

    Click the "Follow" button above to follow Tony John