Commit c4cafad3 authored by Michael's avatar Michael

michael.davityan:exercise_05_29v2

parent e21d016c
Pipeline #24886380 passed with stage
in 2 minutes 2 seconds
......@@ -6,13 +6,13 @@ main()
{
std::cout << std::fixed << std::setprecision(2);
for (int integerRate = 5; integerRate <= 10; ++integerRate) {
double rate = static_cast<int>(integerRate) * 0.01;
double rate = integerRate * 0.01;
long double amount = 24.0;
std::cout << "==================================================================================\n"
<< "---------------------Peter Minuit Deposite by the years---------------------------\n"
<< "==================================================================================\n"
<< "------------------------This table for " << std::setw(2)
<< static_cast<int>(rate * 100) << "%" << " per annum -----------------------------\n"
<< "------------------------This table for " << std::setw(2) << integerRate << "%"
<< " per annum -----------------------------\n"
<< "__________________________________________________________________________________\n";
std::cout << "Year" << std::setw(25) << "Amount on deposit" << std::endl;
......
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