Get Email Subscription

Enter your email address:

Delivered by FeedBurner

Sunday, January 3, 2010

Write a program in 'C' to enter any two numbers and find and print their maximum.(Using if.....else statement)



#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
float a, b, max;
printf("Enter any two numbers\n");
scanf("%f %f", &a, &b);
if(a > b)
max = a;
else
max = b;
printf("The maximum number is %f\n", max);
return(0);
}

For eg :-

Output :-
Enter any two numbers
20.5 32.3
The maximum number is 32.300000

Related Posts by Categories



0 comments:

About This Blog

Lorem Ipsum

  © Blogger templates Newspaper III by Ourblogtemplates.com 2008

Back to TOP