generated from admin/template
выполнение задания 1.2
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 5.7 KiB |
@@ -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}");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user