Advertisement
alexbancheva

Biscuits_Factory_Krassy

Apr 22nd, 2020
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.64 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Biscuits_Factory_Krassy
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.          
  10.             int numberOfBiscForOneWorker = int.Parse(Console.ReadLine());
  11.             int numbersOfWorker = int.Parse(Console.ReadLine());
  12.             int konkorentBiscuitForMounth = int.Parse(Console.ReadLine());
  13.  
  14.             double dayProizvodstvo = 0;
  15.             for (int i = 1; i <= 30; i++)
  16.             {
  17.                 if (i % 3 == 0)
  18.                 {
  19.                     dayProizvodstvo += Math.Floor(0.75 * numbersOfWorker * numberOfBiscForOneWorker);
  20.                     //double discount = usualProzvodstvo * 0.25;
  21.                     //dayProizvodstvo -= discount;
  22.                 }
  23.                 else
  24.                 {
  25.                     dayProizvodstvo += numberOfBiscForOneWorker * numbersOfWorker;
  26.                 }
  27.             }
  28.  
  29.             Console.WriteLine($"You have produced {dayProizvodstvo} biscuits for the past month.");
  30.  
  31.             if (dayProizvodstvo > konkorentBiscuitForMounth)
  32.             {
  33.                 double razikaMejduMoiITehni = dayProizvodstvo - konkorentBiscuitForMounth;
  34.                 Console.WriteLine($"You produce {razikaMejduMoiITehni / konkorentBiscuitForMounth * 100:f2} percent more biscuits.");
  35.             }
  36.             else if (dayProizvodstvo < konkorentBiscuitForMounth)
  37.             {
  38.                 double razikaMejduMoiITehni = konkorentBiscuitForMounth - dayProizvodstvo;
  39.                 Console.WriteLine($"You produce {razikaMejduMoiITehni / konkorentBiscuitForMounth * 100:f2} percent less biscuits.");
  40.             }
  41.         }
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement