Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace CsLightHomeworks
- {
- class Program
- {
- static void Main(string[] args)
- {
- int diamondsPrice = 20;
- Console.Write("Сколько у вас золота: ");
- int goldAmount = Convert.ToInt32(Console.ReadLine());
- Console.Write("Сколько хотите купить кристаллов (1 шт - 20 з): ");
- int diamondsAmount = Convert.ToInt32(Console.ReadLine());
- goldAmount -= diamondsAmount * diamondsPrice;
- Console.WriteLine($"У вас осталось {goldAmount} золота.");
- Console.WriteLine($"У вас осталось {diamondsAmount} кристаллов.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement