Advertisement
DidiMilikina

Задача 01 - Дневна печалба

Sep 18th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4.  
  5. int main() {
  6.     double work_days_in_month;
  7.     double earned_money;
  8.     double dollars;
  9.     cin >> work_days_in_month >> earned_money >> dollars;
  10.  
  11.     double month_salary_in_dollars = work_days_in_month * earned_money;
  12.     double revenue = month_salary_in_dollars * 12 + month_salary_in_dollars * 2.5;
  13.     double tribute = revenue * (25 / 100.0);
  14.     double net_income_in_dollars = revenue - tribute;
  15.     double net_income_in_leva = net_income_in_dollars * dollars;
  16.     double average_profit_per_day_in_leva = net_income_in_leva / 365;
  17.  
  18.     cout << fixed << setprecision(2) << average_profit_per_day_in_leva << endl;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement