Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- internal class Program
- {
- static void Main(string[] args)
- {
- int priceCrystal = 5;
- int crystals = 0;
- int countCrystals;
- int golds;
- Console.Write("Сколько у вас золота? - ");
- golds = Convert.ToInt32(Console.ReadLine());
- Console.Write($"Цена кристала - {priceCrystal}. Сколько желаете купить? - ");
- countCrystals = Convert.ToInt32(Console.ReadLine());
- crystals += countCrystals;
- golds -= countCrystals * priceCrystal;
- Console.WriteLine($"У вас {golds} золота и {crystals} кристалов.");
- Console.ReadKey();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement