C programming
*** Determine the maximum
number of four numbers?
Solution:
#include<stdio.h>
#include<conio.h>
main()
{ int a,b,c,d,x;
clrscr();
printf(“Input four
values::”);
scanf(“%d %d %d
%d”,&a,&b,&c,&d);
x=a;
{
if(x<b)
(x=b);
if(x<c)
(x=c);
if(x<d)
(x=d);
}
printf(“Maximum
number=%d”,x);
getch();
}
No comments:
Post a Comment
Please comment bellow. Share your knowledge