From 9ae89cddcdbd0c7d699821dab0408f02ce295649 Mon Sep 17 00:00:00 2001 From: Misha Date: Tue, 30 Sep 2025 19:52:58 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B8=D1=82=D1=8C=20re?= =?UTF-8?q?ctangle.cpp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rectangle.cpp | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 rectangle.cpp diff --git a/rectangle.cpp b/rectangle.cpp deleted file mode 100644 index 4f9c8c1..0000000 --- a/rectangle.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include - -using namespace std; - -void drawRectangle(int h, int w, char s = '*') { - if (h <= 0 || w <= 0) { - cout << "Помилка: висота та ширина повинні бути додатними числами!" << endl; - return; - } - - for (int i = 0; i < h; ++i) { - for (int j = 0; j < w; ++j) { - cout << s; - } - cout << endl; - } -} - -int main() { - - setlocale(0, ""); - cout << "=== Приклади малювання прямокутників ===" << endl; - - cout << "\nПрямокутник 5x10 зі зірочками (за замовчуванням):" << endl; - drawRectangle(5, 10); - - cout << "\nПрямокутник 3x8 з символом '#' :" << endl; - drawRectangle(3, 8, '#'); - - cout << "\nПрямокутник 4x12 з символом '@' :" << endl; - drawRectangle(4, 12, '@'); - - cout << "\nПрямокутник 2x6 з символом '+' :" << endl; - drawRectangle(2, 6, '+'); - - return 0; -} \ No newline at end of file