Commit 242a006a authored by mary.zaqaryan's avatar mary.zaqaryan

Mary Zaqaryan Exercise_05_11 Version3

parent daca28fd
......@@ -5,13 +5,13 @@ main()
{
std::cout << "Year " << "Deposit amount\n";
for (int rate = 5; rate <= 10; rate++) {
for (int rate = 5; rate <= 10; ++rate) {
std::cout << rate << "% Rate:\n";
double principal = 1000.0;
double rateIncrement = 1 + rate / 100.0;
for (int year = 1; year <= 10; year++) {
for (int year = 1; year <= 10; ++year) {
principal *= rateIncrement;
std::cout << year << " " << principal << "\n";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment