nvnnaidenov

DailyEarnings - Chapter 2.1

Feb 10th, 2022
644
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.50 KB | None | 0 0
  1. //Task 005, Chapter 2.1
  2. using System;
  3.  
  4. public class DailyEarnings
  5. {
  6.     static void Main()
  7.     {
  8.         int days = int.Parse(Console.ReadLine());
  9.         double moneyPerDay = double.Parse(Console.ReadLine());
  10.         double value = double.Parse(Console.ReadLine());
  11.  
  12.         double monthSalary = days * moneyPerDay;
  13.         double yearSallary = monthSalary * 12 + monthSalary * 2.5;
  14.         yearSallary -= yearSallary * 0.25;
  15.  
  16.         Console.WriteLine($"{(yearSallary * value / 365):F2}");
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment