Dynamic Program that print the largest number between three number - 6 Players blogs for technology

give us your feedback

People Online

Breaking

ads

Post Top Ad

Friday, May 24, 2019

Dynamic Program that print the largest number between three number

Dynamic program means it allow a user to enter the numbers


#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

ads1

Post Top Ad