Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace PCstore
- {
- class Program
- {
- static void Main()
- {
- decimal priceUSDofCPU = decimal.Parse(Console.ReadLine());
- decimal priceUSDofVideo = decimal.Parse(Console.ReadLine());
- decimal priceUSDofRAM = decimal.Parse(Console.ReadLine());
- int numberRAM = int.Parse(Console.ReadLine());
- decimal discount = decimal.Parse(Console.ReadLine());
- decimal currency = 1.57m;
- decimal totalPrice = ((priceUSDofCPU + priceUSDofVideo) * (1 - discount) + numberRAM * priceUSDofRAM) * currency;
- Console.WriteLine($"Money needed - {totalPrice:F2} leva.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement