Write a C++ Program to Calculate Simple Interest with example. This C++ program allows users to enter the actual amount (principle amount), rate of interest, and the total number of years. Next, we use them to calculate the simple interest.
#include<iostream>
using namespace std;
int main()
{
float PA, ROI, time, si;
cout << "Please enter the Principal Amount : ";
cin >> PA;
cout << "Please enter the Rate Of Interest : ";
cin >> ROI;
cout << "Please enter the Time Period in Years : ";
cin >> time;
si = (PA * ROI * time) / 100;
cout << "\nSimple Interest = " << si;
return 0;
}