Get Email Subscription

Enter your email address:

Delivered by FeedBurner

Wednesday, December 30, 2009

write a program in 'C' to enter three integers and print the maximum integer?



#include<stdio.h>
main()
{
int a, b, c, max;
printf("Enter three integers\n");
scanf("%d %d %d", &a, &b, &c);
max = (a>b)?a:b;
max = (max>c)?max:c;
printf("The maximum integer is = %d\n", max);
return(0);
}

For eg :-

Output :-

Enter three integers
12 20 50
The maximum integer is = 50

Related Posts by Categories



0 comments:

About This Blog

Lorem Ipsum

  © Blogger templates Newspaper III by Ourblogtemplates.com 2008

Back to TOP