Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace claswork
- {
- class ProgramForCalculatingFans
- {
- public static void Main()
- {
- int targetProduction = int.Parse(Console.ReadLine());//1
- int workersNumber = int.Parse(Console.ReadLine());//1
- double workingDays = double.Parse(Console.ReadLine());//5
- const double singleGlassPrice = 4.20;
- const double workingHoursPerDay = 8;
- const double hoursForOneGlass = 5;
- double targetIncome = targetProduction * singleGlassPrice;//4.20
- double totalWorkingTime = workersNumber * workingHoursPerDay * workingDays;
- double realProduction = totalWorkingTime / hoursForOneGlass;
- double realIncome = realProduction * singleGlassPrice;
- if(realIncome >= targetIncome)
- {
- double moneyMore = realIncome - targetIncome;
- Console.WriteLine("{0:f2} lv. more.", moneyMore);
- }
- else
- {
- double moneyLost = targetIncome - realIncome;
- Console.WriteLine("{0:f2} lv. less", moneyLost);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement