Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

program in c++ for simple interest rate

#include<iostream>
using namespace std;
int main()
{
	int p,t;
	float r,A;
	cout<<"Plese enter the intial principal balance ="<<p<<endl;
	cin>>p;
	cout<<"Plese enter the annual interest rate ="<<r<<endl;
	cin>>r;
	cout<<"Plese enter the time (in months) ="<<t<<endl;
	cin>>t;
	A=p*(1+r*t);
	cout<<"The simple intrest rate is="<<A<<endl;
	return 0;
}
 
PREVIOUS NEXT
Tagged: #program #simple #interest #rate
ADD COMMENT
Topic
Name
9+5 =