9. Write a C program to determine the amount of compound interest to be paid by the borrower, if the principal amount, rate of interest, and tenure are entered by the user.

Posted: September 15, 2012 in CSE Sem1, ECE Sem1, Lab 9, Lab 9
#include<stdio.h>
#include<math.h>
int main()
{
 float p,rate,time,ci;
 printf("Enter principal amount : ");
 scanf("%f", &p);
 printf("Enter interest rate : ");
 scanf("%f", &rate);
 printf("Enter time period in year : ");
 scanf("%f", &time);
 ci=p*(pow((1+rate/100),time)-1);
 printf("\nCompound interest = %f",ci);
 return 0;
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s