Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.Collections.Generic;
- namespace fundamental14
- {
- class MainClass
- {
- public static void Main()
- {
- int bisquut = int.Parse(Console.ReadLine());
- int worker = int.Parse(Console.ReadLine());
- int secondFactory = int.Parse(Console.ReadLine());
- double sum = 0;
- int prodDay = bisquut * worker;
- for (int i = 1; i <= 30; i++)
- {
- if (i % 3 == 0)
- {
- sum += Math.Floor(prodDay * 0.75);
- }
- else
- {
- sum += prodDay;
- }
- }
- Console.WriteLine($"You have produced {sum} biscuits for the past month.");
- double result = 0;
- double press = 0;
- if (sum > secondFactory)
- {
- result = sum - secondFactory;
- press = (result / secondFactory) * 100;
- Console.WriteLine($"You produce {press:f2} percent more biscuits.");
- }
- else
- {
- result = secondFactory - sum;
- press = (result / secondFactory) * 100;
- Console.WriteLine($"You produce {press:f2} percent less biscuits.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement