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]
/
ch3
/
exercises
/
ex1.c
blob
360b31cd93be783742b2f9663e8b1fc1bdb680f6
1
#include<stdio.h>
2
3
int
main
()
4
{
5
int
hours
;
6
int
i
;
7
float
pay
;
8
i
=
1
;
9
10
while
(
i
<=
10
)
11
{
12
printf
(
"Enter the number of hours: "
);
13
scanf
(
"%d"
,&
hours
);
14
15
if
((
hours
-
40
)>
0
)
16
{
17
printf
(
"You get an overpay award
\n
"
);
18
pay
= (
hours
-
40
)*
12
;
19
printf
(
"The overtime award: %.2f
\n
"
,
pay
);
20
}
21
else
22
{
23
printf
(
"You dont get an overtime pay
\n
"
);
24
}
25
26
i
++;
27
}
28
printf
(
"Bye"
);
29
return
0
;
30
}