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 Homework_1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int myCrystal = 0, crystalCourse = 50;
- Console.Write("Ваше золото: ");
- int myGold = Convert.ToInt32(Console.ReadLine());
- Console.Write($"\nКурс за кристалл: 1/{crystalCourse}");
- Console.Write("\nКол-во кристаллов для покупки: ");
- int crystalBuy = Convert.ToInt32(Console.ReadLine());
- Console.Clear();
- myCrystal += crystalBuy;
- myGold -= crystalBuy * crystalCourse;
- Console.WriteLine($"Баланс:\n{myGold} золота\n{myCrystal} кристаллов");
- Console.ReadKey();
- }
- }
- }
Add Comment
Please, Sign In to add comment