Created
May 1, 2025 19:18
-
-
Save OngarRagar/8af6faf3bc80dc7350f976bedd4267f9 to your computer and use it in GitHub Desktop.
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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace konsol | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
int crystal; | |
int crystalPrice = 6; | |
int mane; | |
int Acquired; | |
Console.WriteLine($"Здравствуйте, сегодня цена одного кристалла составляет {crystalPrice} монет"); | |
Console.Write("Сколько у вас золота? "); | |
mane = Convert.ToInt32(Console.ReadLine()); | |
Console.WriteLine("Сколько кристаллов хотите купить? "); | |
crystal = Convert.ToInt32(Console.ReadLine()); | |
mane -= crystal*crystalPrice; | |
Console.WriteLine($"У вас осталось {mane} монет, вы получили {crystal} кристаллов"); | |
Console.ReadKey(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment