From 4f189ec8f8e42e8b7c1e8c2d3a9cb87730dba7f0 Mon Sep 17 00:00:00 2001 From: rk_kraken Date: Mon, 18 Nov 2024 09:28:25 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B8=D1=82=D1=8C=20f1?= =?UTF-8?q?.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- f1.c | 96 ------------------------------------------------------------ 1 file changed, 96 deletions(-) delete mode 100644 f1.c diff --git a/f1.c b/f1.c deleted file mode 100644 index 15c25f1..0000000 --- a/f1.c +++ /dev/null @@ -1,96 +0,0 @@ -#define _CRT_SECURE_NO_WARNINGS -#include -#include - -void f1(int n) { - printf("%d ", n); - if (n > 1) { - f1(n - 2); - } -} - -void f2(int n) { - printf("%d ", n); - if (n < 11) { - f2(n + 2); - } -} - -void f3(int n) { - printf("%d ", n); - if (n > 1) { - f3(n - 2); - } - printf("%d", n); -} - -void recEGE1(int n) { - if (n >= 1) { - printf(" %d", n); - recEGE1(n - 1); - recEGE1(n - 1); - } -} - -void ege2(int n) { - if (n > 2) { - printf("%d\n", n); - ege2(n - 3); - ege2(n - 4); - } -} - -void ege3(int n) { - if (n < 5) { - printf("%d\n", n); - ege3(n + 1); - ege3(n + 3); - } -} - -void g3(int n); - -void ege4(int n) { - if (n > 0) - g3(n - 1); -} - -void g3(int n) { - printf("*"); - if (n > 1) - ege4(n - 3); -} - -void zad9(int n) { - if (n > 0) { - printf("<"); - zad9(n - 1); - printf("%d", n); - printf(">"); - } -} - -void main() { - f1(11); - printf("\n"); - - f2(1); - printf("\n"); - - f3(11); - printf("\n"); - - recEGE1(3); - printf("\n"); - - ege2(10); - printf("\n"); - - ege3(1); - printf("\n"); - - f3(11); - printf("\n"); - - zad9(5); -} \ No newline at end of file