Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Linq;
- using System.Threading;
- namespace ConsoleApp1
- {
- class Exam
- {
- static void Main(string[] args)
- {
- double biscuits = double.Parse(Console.ReadLine());
- int workers = int.Parse(Console.ReadLine());
- int concurent = int.Parse(Console.ReadLine());
- double production = 0;
- for (int i = 1; i <= 30; i++)
- {
- if (i % 3 == 0)
- {
- production += Math.Floor(biscuits * workers * 0.75);
- }
- else
- {
- production += biscuits * workers;
- }
- }
- Console.WriteLine($"You have produced {production} biscuits for the past month.");
- if (production > concurent)
- {
- double percentage = (production - concurent) / concurent * 100.0;
- Console.WriteLine($"You produce {percentage:F2} percent more biscuits.");
- }
- if (production < concurent)
- {
- double percentage = (concurent - production) / concurent * 100.0;
- Console.WriteLine($"You produce {percentage:F2} percent less biscuits.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement