Sunday 4 January 2015

Cpp Program to calculate Simple Interest


This is a Cpp program which  calculates the Simple Interest based on the formula

SI = (Principle Amount * Time Period * Rate Of Interest) / 100


PROGRAM :
#include <iostream>

using namespace std;

int main()
{
    float p,t,r,si;
    cout << "Enter Principle Amount :\t" ;
    cin >> p ;
    cout << "\nEnter Time Period :\t" ;
    cin >> t ;
    cout << "\nEnter Rate Of Intrest :\t" ;
    cin >> r ;

    si = (p*t*r)/100;

    cout << "\nSimple Intrest : "<< si;
    return 0;
}

OUTPUT :