From f822c5b77ecdec4cf341d0e8532d4bccbcb9bb4c Mon Sep 17 00:00:00 2001 From: Misha Date: Tue, 23 Sep 2025 19:33:37 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20print.cpp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- print.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 print.cpp diff --git a/print.cpp b/print.cpp new file mode 100644 index 0000000..5859157 --- /dev/null +++ b/print.cpp @@ -0,0 +1,22 @@ +#include +using namespace std; + +void print(int n) { + if (n == 0) { + return; + } + cout << "*"; + print(n - 1); +} + +int main() { + setlocale(0, ""); + int n; + cout << "Введiть кiлькiсть зiрок: "; + cin >> n; + + print(n); + cout << endl; + + system("pause"); +} \ No newline at end of file