Write a C++ program to input the principal amount (p), rate of interest(r) and time in years (t). calculate and display the simple interest S as PRT/100
Answers
Answered by
0
Answer:
C++ program to calculate simple interest. Simple interest is a quick and easy method of calculating the interest charge on a loan. Simple interest is determined by multiplying the daily interest rate by the principal by the number of days that elapse between payments.
The formula for simple interest is given as,
Simple Interest = (principal amount × interest rate × time) / 100
#include<iostream>
using namespace std;
int main()
{
// declare variables
float p, t, r, interest;
// take input from end-user
cout << "Enter principal amount, time and rate:";
cin >> p >> t >> r;
// calculate interest
interest = (p*t*r)/100;
// display result
cout << "Interest = " << interest
Similar questions