C++ program to enter the P, T, R, and calculate it's Simple Interest
ADVERTISEMENTS
C++ program to enter the P, T, R, and calculate its Simple Interest. There are you will learn how to find the Simple Interest through P, T, R in the C++ language.
Formula:
SI = (P * T * R) / 100
Where:
P = principal amount
T = time
R = rate
SI = simple interest
Let us understand this example through the C++ program:
// C++ program to enter the P, T, R, and calculate it's Simple Interest
#include <iostream>
using namespace std;
int main() {
float p, t, r, SI;
// p = principal
// t = time
// r = rate
// SI = simple interest
cout << "Enter the principal (amount), time, and rate::\n";
cin >> p >> t >> r;
// Calculate simple interest
SI = (p * t * r) / 100;
// Output
cout << "\nSimple Interest = " << SI;
return 0;
}
Output:
Enter the principal (amount), time, and rate::
5
7
9
Simple Interest = 3.15