Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Renovation
- {
- class Program
- {
- static void Main(string[] args)
- {
- int x = int.Parse(Console.ReadLine());
- int y = int.Parse(Console.ReadLine());
- int nonPaint = int.Parse(Console.ReadLine());
- double paint = x * y * 4 - (x * y * 4 * nonPaint / 100);
- double sum = 0;
- string painting = Console.ReadLine();
- while (painting != "Tired!")
- {
- int partPaint = int.Parse(painting);
- sum += partPaint;
- if (sum >= paint)
- {
- break;
- }
- painting = Console.ReadLine();
- }
- if (sum < paint)
- {
- Console.WriteLine($"{paint - sum} quadratic m left.");
- }
- else if (sum == paint)
- {
- Console.WriteLine("All walls are painted! Great job, Pesho!");
- }
- else
- {
- Console.WriteLine($"All walls are painted and you have {sum - paint} l paint left!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement