Search This Blog

Sep 27, 2013

C program to calculate compound intrest

/* Program to calculate compounded amount */
#include<conio.h>
#include<stdio.h>
#include<math.h>
void main()
{
float p,n,r,f;
clrscr();
printf("Enter Principal amount:");
scanf("%f",&p);
printf("\nEnter no. of Year:");
scanf("%f",&n);
printf("\nEnter the rate:");
scanf("%f",&r);
f=p*pow(1+r,n);
printf("\nThe compounded aount =%.2f",f);
getch();
}

No comments:

Post a Comment