Get Email Subscription

Enter your email address:

Delivered by FeedBurner

Wednesday, February 3, 2010

Write a program in c to display the simple interest

Write a program in c to display the simple interest table from 1st year to 10th year for the principle amount (p) Rs. 10,000/- and the rate of interest (r)2% p.a. with the formula si = p*n*r/100



#include<stdio.h>
#include<conio.h>
#include<math.h>
main( )
{
clrscr( );
int n;
float p, r, si;
p = 10000;
r = 2;
printf("\t Simple interest table\n");
printf("\n Year\t Interest(Rs.)\n");
for (n=1; n < =10; n++)
{
si = p*n*r/100;
printf("%d\t%f\n", n, si);
}
return(0);
}

Output




































Simple Interest Table
Year Interest(Rs.)
1 200.000000
2
400.000000
3
600.000000
4
800.000000
5
1000.000000
6
1200.000000
7
1400.000000
8
1600.000000
9
1800.000000
10
2000.000000

Related Posts by Categories



0 comments:

About This Blog

Lorem Ipsum

  © Blogger templates Newspaper III by Ourblogtemplates.com 2008

Back to TOP