diff --git a/works/lab-02/screenshots/задание1.2.png b/works/lab-02/screenshots/задание1.2.png new file mode 100644 index 0000000..3ebd3b7 Binary files /dev/null and b/works/lab-02/screenshots/задание1.2.png differ diff --git a/works/lab-02/src/lab2_1.2.cs b/works/lab-02/src/lab2_1.2.cs new file mode 100644 index 0000000..78278a1 --- /dev/null +++ b/works/lab-02/src/lab2_1.2.cs @@ -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}"); + + } + +} \ No newline at end of file