Search Your C Program

Thursday, 26 January 2012

Program to Calculate Compound Interest

#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
                 float p,r,t,a,ci;
                 clrscr();
                 printf("\nEnter principal amount , rate of interest and time : ");
                 scanf("%f %f %f",&p,&r,&t);
                 a=p*pow((1+r/100),t);
                 ci=a-p;
                 printf("\n The compound interest  = %f",ci);
                 getch();

No comments:

Post a Comment