(C++) CPP Programs - 1
Friday, December 14, 2007
1. Write a C program to find biggest of 3 numbers.
#include
{
int a,b,c,big;
clrscr(); //clears the screen
scanf("%d%d%d",&a,&b,&c);//3 inputs
printf("%d is the biggest of the three\n\a",a);
else if((b>a)&&(b>c)) //checks whether b is greater
printf("%d is the biggest of the three\n\a",b);
else //c is greater
printf("%d is the biggest of the three\n\a",c);
}
0 comments:
Post a Comment