From b8ee5fc507121baa3e0268f77e5882dcc02d36a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80=20=D0=97=D0=B8=D0=BC=D0=BA=D0=B8?= =?UTF-8?q?=D0=BD?= Date: Thu, 14 Nov 2024 12:38:51 +0400 Subject: [PATCH] 1 --- ConsoleApplication1/ConsoleApplication1.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/ConsoleApplication1/ConsoleApplication1.cpp b/ConsoleApplication1/ConsoleApplication1.cpp index 9d6500d..69d60b8 100644 --- a/ConsoleApplication1/ConsoleApplication1.cpp +++ b/ConsoleApplication1/ConsoleApplication1.cpp @@ -3,9 +3,21 @@ #include -int main() -{ - std::cout << "Hello World!\n"; +void f(int n) { + if (n > 0) { + printf("<"); + printf("*"); + f(n - 1); + printf("%d>", n); + printf("*"); + } +} + +int main() { + printf("START\n"); + f(5); + printf("\nFINISH\n"); + return 0; } // Запуск программы: CTRL+F5 или меню "Отладка" > "Запуск без отладки"