Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Clight_06
- {
- class Program
- {
- static void Main(string[] args)
- {
- int diamondPrice = 30;
- Console.Write("Введите количество Вашего золота: ");
- int amountGold = Convert.ToInt32(Console.ReadLine());
- Console.Write($"Введите количество кристаллов, которые хотите купить, по {diamondPrice} за штуку: ");
- int amountDiamonds = Convert.ToInt32(Console.ReadLine());
- amountGold = amountGold - (amountDiamonds * diamondPrice);
- Console.WriteLine($"В итоге у Вас {amountDiamonds} кристалла и осталось {amountGold} золота.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement