Advertisement
Spocoman

Cat Expenses

Nov 23rd, 2021
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.49 KB | None | 0 0
  1. using System;
  2.  
  3. namespace CatExpenses
  4. {
  5.     class Program
  6.     {
  7.         static void Main()
  8.         {
  9.             double bedPrice = double.Parse(Console.ReadLine());
  10.             double toilet = double.Parse(Console.ReadLine());
  11.  
  12.             double food = toilet * 1.25;
  13.             double toys = food / 2;
  14.             double vet = toys * 1.1;
  15.             double sum = (toilet + food + toys + vet) * 12 * 1.05 + bedPrice;
  16.  
  17.             Console.WriteLine($"{sum:f2}");
  18.         }
  19.     }
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement