C++ Programs & Stuffz

Nothing like anything!!!

Please Click on ADS!!

Please Click on the above ads given by GOOGLE , so that I can maintain my blog!!

Tuesday, August 31, 2010

Find the greatest of three numbers

//pgm to find the greatest of three numbers
#include<iostream.h>
#include<conio.h>
void main()
{
    int a,b,c,large;
    clrscr();
    cout<<"enter the first number";
    cin>>a;
    cout<<"enter the second number";
    cin>>b;
    cout<<"enter the third number";
    cin>>c;
    large=a;
    if(b>large)
        large=b;
    if(c>large)
        large=c;
    cout<<"large="<<large;
    getch();
}

0 comments:

Post a Comment

free counters