Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Ivka
- {
- class Program
- {
- static void Main(string[] args)
- {
- int biscuitPerDayPerWorker = int.Parse(Console.ReadLine());
- int numWorkers = int.Parse(Console.ReadLine());
- int otherFactoryBiscuits = int.Parse(Console.ReadLine());
- double totalBiscuit = 0;
- for (int i = 1; i <= 30; i++)
- {
- if (i % 3 == 0)
- {
- totalBiscuit += Math.Floor((biscuitPerDayPerWorker * numWorkers) * 0.75);
- }
- else
- {
- totalBiscuit += biscuitPerDayPerWorker * numWorkers;
- }
- }
- Console.WriteLine($"You have produced {totalBiscuit} biscuits for the past month.");
- double percentage = Math.Abs((totalBiscuit - otherFactoryBiscuits) / otherFactoryBiscuits) * 100;
- if (totalBiscuit > otherFactoryBiscuits)
- {
- Console.WriteLine($"You produce {percentage:f2} percent more biscuits.");
- }
- else
- {
- Console.WriteLine($"You produce {percentage:f2} percent less biscuits.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement