Advertisement
spasnikolov131

Untitled

Jun 14th, 2022
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Add_Bags
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int hight = int.Parse(Console.ReadLine());
  10. int length = int.Parse(Console.ReadLine());
  11. int percentage = int.Parse(Console.ReadLine());
  12.  
  13. const int walls = 4;
  14. int totalCover = 0;
  15.  
  16. totalCover = hight * length * walls;
  17. totalCover = totalCover - (percentage / 100);
  18.  
  19.  
  20.  
  21. while (true)
  22. {
  23. string line = Console.ReadLine();
  24. if (line == "Tired!")
  25. {
  26. int count = int.Parse(line);
  27.  
  28. totalCover -= count;
  29. ;
  30. }
  31.  
  32. }
  33.  
  34. Console.WriteLine(totalCover);
  35.  
  36.  
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement