Advertisement
Sim0o0na

01. Cat Expenses

Jun 18th, 2018
706
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.74 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Practice
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             double bed = double.Parse(Console.ReadLine());
  14.             double toilet = double.Parse(Console.ReadLine());
  15.  
  16.             double food = toilet + 0.25 * toilet;
  17.             double toys = food - food * 0.5;
  18.             double vet = toys + toys * 0.1;
  19.             double cost = toilet + food + toys + vet;
  20.             double additional = cost * 0.05;
  21.             cost += additional;
  22.             double costPerYear = bed+ cost * 12;
  23.             Console.WriteLine($"{costPerYear:F2} lv.");
  24.  
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement