generated from admin/template
Загрузить файлы в «works/lab-02»
This commit is contained in:
@@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
public class lab2
|
||||||
|
{
|
||||||
|
public static void Main()
|
||||||
|
{
|
||||||
|
int trainerBalance = 1500;
|
||||||
|
int potionPrice = 200;
|
||||||
|
int potionBuyAmount;
|
||||||
|
Console.WriteLine($"Текущий баланс средств Тренера: {trainerBalance}");
|
||||||
|
Console.WriteLine($">> стоимость зелья лечени = {potionPrice} монет <<");
|
||||||
|
Console.Write("Введите количество покупаемых зелий: ");
|
||||||
|
Console.WriteLine(potionBuyAmount = int.Parse(Console.ReadLine()));
|
||||||
|
Console.WriteLine($"Успешная покупка на сумму {potionPrice * potionBuyAmount} монет. Ваш остаток {trainerBalance - (potionPrice * potionBuyAmount)}.");
|
||||||
|
Console.ReadKey();
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user