Commit b154442c authored by Michael's avatar Michael

michael.davityan:exercise_05_11v3

parent 61fb0cc5
......@@ -9,10 +9,12 @@ main()
for (int integerRate = 5; integerRate <= 10; ++integerRate) {
double rate = static_cast<int>(integerRate) * 0.01;
double amount = 1000.0;
std::cout << "----------------------------------------------------------------------------------\n"
<< "This table for " << std::setw(2) << static_cast<int>(rate * 100) << "%"
<< " per annum =====================================================\n"
<< "----------------------------------------------------------------------------------\n";
std::cout << "==================================================================================\n"
<< "------------------------This table for "
<< std::setw(2) << static_cast<int>(rate * 100) << "%"
<< " per annum -----------------------------\n"
<< "==================================================================================\n";
std::cout << "Year" << std::setw(21) << "Amount on deposit" << std::endl;
for (int year = 1; year <= 10; ++year) {
......@@ -21,7 +23,6 @@ main()
}
}
std::cout << "==================================================================================\n"
<< "----------------------------------------------------------------------------------\n"
<< "==================================================================================" << std::endl;
return 0;
}
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