Back To C Flow of Control Index
//program to input three numbers and find largest of three numbers using if-else statement #include
#include
void main() { int a,b,c,max; clrscr(); printf("enter value for a"); scanf("%d",&a); printf("enter value for b"); scanf("%d",&b); printf("enter value for c"); scanf("%d",&c); max=a; if(b>max) { max=b; } if(c>max) { max=c; } printf("largest number in a,b,c is %d",max); getch(); }