move to repo.or.cz
[letusc.git] / ch1 / examples / example1.c
blobc8e2fc8a7c8fa9991f4cf3e2ae7a40fab5a5bcbd
1 /*calculation of simple interest*/
2 /*Author:lakshmanan*/
4 #include<stdio.h>
6 void main()
8 int p=1000,n=3;
9 float r=n+5.5,si;
11 /*p=1000;
12 n=3;
13 r=8.5;*/
16 printf("value of r=%f n=%d",r,n);
18 /*formula to find simple interest*/
19 si=p*n*r/100;
21 printf("\n%f\n",si);