Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace CSLight
- {
- class Program
- {
- static void Main(string[] args)
- {
- int availableCoins, crystalsValue;
- int priceForCrystal = 45;
- Console.WriteLine("Введите количество монет: ");
- availableCoins = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Сколько кристалов вы хотите купить? (один кристал стоит 45 монет) - ");
- crystalsValue = Convert.ToInt32(Console.ReadLine());
- availableCoins -= (crystalsValue * priceForCrystal);
- Console.WriteLine($"У вас на счету {availableCoins} монет и {crystalsValue} кристалов.");
- Console.ReadKey();
- }
- }
- }
Add Comment
Please, Sign In to add comment