Commit 371712fc authored by Michael's avatar Michael

michael.davityan:exercise_04_16

parent 4abdb201
Pipeline #23073754 passed with stage
in 1 minute and 45 seconds
......@@ -20,9 +20,9 @@ main()
}
double hourlyRate;
std::cin >> hourlyRate;
std::cout << "Salary is $" << std::setprecision(2) << std::fixed << (workingHours > 40 ?
40 * hourlyRate + (workingHours - 40) * 1.5 * hourlyRate : workingHours * hourlyRate)
<< "\n"<< std::endl;
std::cout << "Salary is $" << std::setprecision(2) << std::fixed;
std::cout << hourlyRate * (workingHours > 40 ? 1.5 * workingHours - 20 : workingHours);
std::cout << "\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