Advertisement
Sim0o0na

01. PC Store

Mar 12th, 2018
636
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.63 KB | None | 0 0
  1. using System;
  2.  
  3. class Program
  4. {
  5.     static void Main(string[] args)
  6.     {
  7.         double processorPrice = double.Parse(Console.ReadLine());
  8.         double videoCardPrice = double.Parse(Console.ReadLine());
  9.         double ramPrice = double.Parse(Console.ReadLine());
  10.         int ramQuantity = int.Parse(Console.ReadLine());
  11.         double discountPercent = double.Parse(Console.ReadLine());
  12.  
  13.         double totalDollars = (processorPrice + videoCardPrice) * (1 - discountPercent) + ramPrice * ramQuantity;
  14.         double totalLeva = totalDollars * 1.57;
  15.  
  16.         Console.WriteLine($"Money needed - {totalLeva:F2} leva.");
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement