Created
December 6, 2022 12:45
-
-
Save NonymousMorlock/1effdc6b8af4093b1737d91937637204 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <iomanip> | |
using namespace std; | |
int main() | |
{ | |
double amount = 100000; | |
double interest = 0.08; | |
double total = 0; | |
for (int year = 1; year <= 5; year++) | |
{ | |
total = amount * (1 + interest); | |
amount = total; | |
} | |
cout << total << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment