Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _10_Rage_Expenses
- {
- class Program
- {
- static void Main(string[] args)
- {
- int games = int.Parse(Console.ReadLine());
- double headsetpr = double.Parse(Console.ReadLine());
- double mousepr = double.Parse(Console.ReadLine());
- double keyboardpr = double.Parse(Console.ReadLine());
- double displaypr = double.Parse(Console.ReadLine());
- int headset = 0;
- for (int i = 1; i <= games; i+=2)
- {
- headset = i/2;
- }
- int mouse = 0;
- for (int i = 1; i <= games; i += 3)
- {
- mouse = i/3;
- }
- int keyboard = 0;
- for (int i = 1; i <= games; i += 6)
- {
- keyboard = i/6;
- }
- int display = 0;
- for (int i = 1; i <= games; i += 12)
- {
- display = i/12;
- }
- double price = headset * headsetpr + mouse * mousepr + keyboard * keyboardpr + display * displaypr;
- Console.WriteLine($"Rage expenses: {price:f2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement