Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq.Expressions;
- namespace Add_Bags
- {
- class Program
- {
- static void Main(string[] args)
- {
- int hight = int.Parse(Console.ReadLine());
- int length = int.Parse(Console.ReadLine());
- int percentage = int.Parse(Console.ReadLine());
- const int walls = 4;
- double totalCover = 0;
- int count = 0;
- totalCover = hight * length * walls;
- totalCover -= totalCover * (percentage * 0.01);
- while (true)
- {
- string line = Console.ReadLine();
- count = int.Parse(line);
- if (line == "Tired!")
- {
- break;
- }
- totalCover -= count;
- }
- Console.WriteLine(totalCover);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment