выполнение задания 1.2

This commit is contained in:
2026-09-04 13:30:24 +03:00
parent 961f253c41
commit 9c44dfcb48
2 changed files with 20 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
namespace DefaultNamespace;
public class lab2_1_2
{
static void Main(string[] args)
{
int balance = 1500;
int potion_price = 200;
Console.Write("Количество зелий для покупки: ");
int count_potion = int.Parse(Console.ReadLine());
int end_price = potion_price * count_potion;
Console.WriteLine($"Итоговая сумма заказа: {end_price}");
int end_balance = balance - end_price;
Console.WriteLine($"Итоговый баланс: {end_balance}");
}
}