Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ConsoleApplication3.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include "stdafx.h"
- #include <iostream>
- #include <string>
- #include <cmath>
- using namespace std;
- int main()
- {
- double loanamount = 100;
- double interestrate = .05;
- double paybackamount = 0;
- double length;
- int i;
- for (int i = 0; i < 5; i++)
- {
- paybackamount += (loanamount*interestrate);
- }
- paybackamount += loanamount;
- cout << "you owe your friend " << paybackamount << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment