Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp18
- {
- class Program
- {
- static void Main(string[] args)
- {
- int games = int.Parse(Console.ReadLine());
- double headsetPrize = double.Parse(Console.ReadLine());
- double mousePrize = double.Parse(Console.ReadLine());
- double keyboardPrize = double.Parse(Console.ReadLine());
- double displayPrize = double.Parse(Console.ReadLine());
- double rageExp = 0;
- for (int i = 1; i < games+1; i++)
- {
- if (i % 2 == 0) rageExp += headsetPrize;
- if (i % 3 == 0) rageExp += mousePrize;
- if (i % 6 == 0) rageExp += keyboardPrize;
- if (i % 12 == 0) rageExp += displayPrize;
- }
- Console.WriteLine($"Rage expenses: {rageExp:f2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement