Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save OngarRagar/8af6faf3bc80dc7350f976bedd4267f9 to your computer and use it in GitHub Desktop.
Save OngarRagar/8af6faf3bc80dc7350f976bedd4267f9 to your computer and use it in GitHub Desktop.
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