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
/
examples
/
example4.c
blob
ddea032faa9568896fa9eab197ee1dccd1aaa759
1
#include<stdio.h>
2
3
int
main
()
4
{
5
6
float
basic
,
gross
,
hra
,
da
;
7
8
printf
(
"Enter the basic salary: "
);
9
scanf
(
"%f"
,&
basic
);
10
11
if
(
basic
<
1500
)
12
{
13
hra
=
basic
*
10
/
100
;
14
da
=
basic
*
90
/
100
;
15
}
16
else
17
{
18
hra
=
500
;
19
da
=
0.98
*
basic
;
20
}
21
gross
=
basic
+
hra
+
da
;
22
printf
(
"The gross salary is %f
\n
"
,
gross
);
23
return
0
;
24
}