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.Diagnostics.CodeAnalysis;
- using System.Linq;
- using System.Threading;
- namespace ConsoleApp1
- {
- class Exam
- {
- static void Main(string[] args)
- {
- int loses = int.Parse(Console.ReadLine());
- double headset = double.Parse(Console.ReadLine());
- double mouse = double.Parse(Console.ReadLine());
- double keyboard = double.Parse(Console.ReadLine());
- double display = double.Parse(Console.ReadLine());
- int headsetTrash = 0;
- int mouseTrash = 0;
- int keyboardTrash = 0;
- int displayTrash = 0;
- for (int i = 1; i <= loses; i++)
- {
- if (i % 2 == 0)
- {
- headsetTrash++;
- }
- if (i % 3 == 0)
- {
- mouseTrash++;
- }
- if(i % 6 == 0)
- {
- keyboardTrash++;
- }
- if (i % 12 == 0)
- {
- displayTrash++;
- }
- }
- double sum = (headset * headsetTrash) + mouse * mouseTrash + keyboard * keyboardTrash + display * displayTrash;
- Console.WriteLine($"Rage expenses: {sum:f2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement