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]
/
ch1
/
examples
/
example1.c
blob
c8e2fc8a7c8fa9991f4cf3e2ae7a40fab5a5bcbd
1
/*calculation of simple interest*/
2
/*Author:lakshmanan*/
3
4
#include<stdio.h>
5
6
void
main
()
7
{
8
int
p
=
1000
,
n
=
3
;
9
float
r
=
n
+
5.5
,
si
;
10
11
/*p=1000;
12
n=3;
13
r=8.5;*/
14
15
16
printf
(
"value of r=%f n=%d"
,
r
,
n
);
17
18
/*formula to find simple interest*/
19
si
=
p
*
n
*
r
/
100
;
20
21
printf
(
"
\n
%f
\n
"
,
si
);
22
}
23