Flowchart and C Program that prints the greater among 3 numbers.
Flowchart :-
#include<stdio.h>
#include<conio.h>
void main()
{ int a,b,c;
clrscr();
scanf("%d",&a);
printf("Enter second number :");
scanf("%d",&b);
printf("Enter third number :");
scanf("%d",&c);
if(a>b)
{ if(a>c)
printf("%d is greatest among these.",a);
else
printf("%d is greatest among these.",c);
}
else
{ if(b>c)
printf("%d is greatest among these.",b);
else
printf("%d is greatest among these.",c);
}
getch();
}
Comments
Post a Comment