Advertisement
Guest User

Untitled

a guest
May 21st, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.91 KB | None | 0 0
  1. using System;
  2.  
  3. namespace RageExspressnes
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int lostGamesCount = int.Parse(Console.ReadLine());
  10.             float headsetPrice = float.Parse(Console.ReadLine());
  11.             float mousePrice = float.Parse(Console.ReadLine());
  12.             float keyboardPrice = float.Parse(Console.ReadLine());
  13.             float displayPrice = float.Parse(Console.ReadLine());
  14.  
  15.             int countOfHeadsets = lostGamesCount / 2;
  16.             int countOfMouses = lostGamesCount / 3;
  17.             int countOfKeyboards = lostGamesCount / 6;
  18.             int countOfDisplays = countOfKeyboards / 2;
  19.  
  20.             float totalPrice = countOfHeadsets * headsetPrice + countOfMouses * mousePrice + countOfKeyboards * keyboardPrice+countOfDisplays*displayPrice;
  21.             Console.WriteLine($"Rage expenses: {totalPrice:f2} lv.");
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement