Skip to main content

Write a program which input principal, rate and time from user and calculate compound interest.

 

#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
	float P,R,T,CI;
	cout<<"Enter Principal, Rate and Time ";
	cin>>P>>R>>T;
	CI=P*pow((1+R/100),T) - P;
	cout<<"Compound Interest is "<<CI;
	getch();
}
 

Comments

  1. Compound interest is the best way to do some saving , this program seems to be perfect for input principal.

    ReplyDelete

Post a Comment