#include <stdio.h>
#include <stdlib.h>
int main()
{
/* this is a dynamic program*/
int a,b,c;
printf("\n\t enter the first number = ");
scanf("%d",&a);
printf("\n\t enter the second number = ");
scanf("%d",&b);
printf("\n\t enter the third number = ");
scanf("%d",&c);
if(a>b && a>c){
printf("\n\t%d is the largest number",a);
}else if(b>c){
printf("\n\t %d is the largest number",b);
}else printf("\n\t %d is the largest number",c);
return main();
}
the output
enter the first number = 10
enter the second number = 20
enter the third number = 30
30 is the largest number
No comments:
Post a Comment