Advertisement
Daten

01. PC Store

Mar 12th, 2018
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.10 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace PC_Store
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             double processor = double.Parse(Console.ReadLine());
  14.             double videocard = double.Parse(Console.ReadLine());
  15.             double ram = double.Parse(Console.ReadLine());
  16.             double ramCount = double.Parse(Console.ReadLine());
  17.             double discount = double.Parse(Console.ReadLine());
  18.  
  19.             double processorPriceLv = processor * 1.57;
  20.             double processorPriceAfterDiscount = processorPriceLv - (processorPriceLv * discount);
  21.             double videocardPriceLv = videocard * 1.57;
  22.             double videocardPriceAfterDiscount = videocardPriceLv - (videocardPriceLv * discount);
  23.             double ramPriceLv = (ram * ramCount) * 1.57;
  24.  
  25.             double totalPrice = processorPriceAfterDiscount + videocardPriceAfterDiscount + ramPriceLv;
  26.  
  27.             Console.WriteLine("Money needed - {0:f2} leva.", totalPrice);
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement