Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Repainting
- {
- class Program
- {
- static void Main(string[] args)
- {
- //Четем 4 реда от конзолата (3 материала + часове за работа)
- int nylonQuantity = int.Parse(Console.ReadLine());
- int paintQuantity = int.Parse(Console.ReadLine());
- int thinnerLiters = int.Parse(Console.ReadLine());
- int workersHours = int.Parse(Console.ReadLine());
- //изчисляваме сумата на всеки един от материалите (общо 3)
- double nylonPrice = (nylonQuantity+2) * 1.50;
- double paintPrice = (paintQuantity + paintQuantity*0.1) * 14.50;
- double thinnerPrice = thinnerLiters * 5.00;
- //изчисляваме разходи за материали (общо 3 + цена за торбичка)
- double materialsSum = nylonPrice + paintPrice + thinnerPrice + 0.40;
- //заплата на майстора (часове * 30% от разходи за материали)
- double workersSum = (materialsSum * 0.3) * workersHours;
- //общо сумата от всички разходи (разходи за материали + заплата на майстора)
- double totalSum = materialsSum + workersSum;
- //отпечатваме общата сумата от всички разходи
- Console.WriteLine(totalSum);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment