[ create a new paste ] login | about

Link: http://codepad.org/fdzdsUiI    [ raw code | output | fork ]

C++, pasted on Oct 12:
1
2
3
4
5
6
7
8
9
10
11
12
13
// prog03.cpp           put your name here             Simple interest
#include <iostream> 
using namespace std;
int main() 
{
float P, R, T, I;
P = 1200.00;
R = 8.5;
T = 12;
I = P * R / 100 / 12 * T;
cout << "the interest of a principle of" << P << " with an interest rate of " << R << " over " << T << "months is " << I << endl;
return 0;
}


Output:
1
the interest of a principle of1200 with an interest rate of 8.5 over 12months is 102


Create a new paste based on this one


Comments: