Programs in C
Monday, 17 August 2015
Find greatest of 3 number using conditional operator
#include
<
stdio.h
>
#include
<
conio.h
>
int
main()
{
int
n1,n2,n3;
prinft(
"Enter Numbers n1, n2, n3 : "
);
scanf(
"%d"%d%d"
,n1,n2,n3);
printf(
"Greatest=%d"
,n1>n2?n1>n3?x:z:y>z?y:z);
getch();
return
0
;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment