Spocoman

07. House Painting

Nov 15th, 2021 (edited)
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.54 KB | None | 0 0
  1. using System;
  2.  
  3.  
  4. namespace HousePainting
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             double x = double.Parse(Console.ReadLine());
  11.             double y = double.Parse(Console.ReadLine());
  12.             double h = double.Parse(Console.ReadLine());
  13.             double green = x * y * 2 - (1.5 * 1.5 * 2) + x * x * 2 - 1.2 * 2;
  14.             double red = 2 * (x * y) + 2 * (x * h / 2);
  15.             Console.WriteLine($"{green / 3.4:F2}");
  16.             Console.WriteLine($"{red / 4.3:F2}");
  17.         }
  18.     }
  19. }
Add Comment
Please, Sign In to add comment