repo.or.cz
/
letusc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
move to repo.or.cz
[letusc.git]
/
ch2
/
exercises3
/
exC.c
blob
493b2057175ef3f0af0035e52fed2b1539f079f1
1
/*greatest of three numbers*/
2
3
#include<stdio.h>
4
5
int
main
()
6
{
7
int
n1
,
n2
,
n3
;
8
int
max
;
9
printf
(
"Enter any three numbers:"
);
10
scanf
(
"%d %d %d"
,&
n1
,&
n2
,&
n3
);
11
12
max
=(
n1
>
n2
&&
n1
>
n3
?
n1
:(
n2
>
n1
&&
n2
>
n3
?
n2
:
n3
));
13
14
printf
(
"Maximum:%d
\n
"
,
max
);
15
return
0
;
16
}