Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp19
- {
- class Program
- {
- static void Main(string[] args)
- {
- int width = int.Parse(Console.ReadLine());
- int lenght = int.Parse(Console.ReadLine());
- int hight = int.Parse(Console.ReadLine());
- int total = lenght * width * hight;
- string command = "";
- int boxSum = 0;
- bool isEnought = false;
- while (!isEnought)
- {
- int box = int.Parse(Console.ReadLine());
- boxSum += box;
- command = Console.ReadLine();
- if (command == "done")
- {
- break;
- }
- if (boxSum > total)
- {
- isEnought = true;
- break;
- }
- }
- if (isEnought)
- {
- Console.WriteLine("no");
- }
- else
- {
- Console.WriteLine("yes");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement