Last active
May 8, 2022 15:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int gold; | |
| int priceCristall = 15; | |
| int amountCristalls; | |
| int payGold; | |
| Console.Write("Сколько у вас золота?: "); | |
| gold = Convert.ToInt32(Console.ReadLine()); | |
| Console.WriteLine("Предлагаю вам кристаллы по цене " + priceCristall + " золота за штуку, сколько вам завернуть?"); | |
| amountCristalls = Convert.ToInt32(Console.ReadLine()); | |
| payGold = amountCristalls * priceCristall; | |
| gold = gold - payGold; | |
| Console.WriteLine("Заберайте свои " + amountCristalls + " кристаллов за " + payGold + " золота,удачи!"); | |
| Console.WriteLine("осталось денег: " + gold ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment