Recent Posts

9-latest-250px-course

Write a C program to Find the largest among three numbers

Write a C program to Find the largest among three numbers


Program:-     

#include <stdio.h>

int main()

{

int a,b,c;

printf("Enter three numbers : ");

scanf("%d %d %d", &a,&b,&c);

int max = 0;

if(a > b && a > c)

printf("\nThe largest among the three numbers is %d",a);

else if(b > a && b > c)

printf("\nThe largest among the three numbers is %d",b);

else

printf("\nThe largest among the three numbers is %d",c);

printf("\n");

return 0;

}

Output:-

....
SHARE

Milan Tomic

Hi. I’m Designer of Blog Magic. I’m CEO/Founder of ThemeXpose. I’m Creative Art Director, Web Designer, UI/UX Designer, Interaction Designer, Industrial Designer, Web Developer, Business Enthusiast, StartUp Enthusiast, Speaker, Writer and Photographer. Inspired to make things looks better.

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment