From eb54488f640d179fb5febb9df1f31b1075d29dda Mon Sep 17 00:00:00 2001 From: Stepan Date: Thu, 7 May 2026 20:45:26 +0300 Subject: [PATCH] add l7.c --- c/l7.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 c/l7.c diff --git a/c/l7.c b/c/l7.c new file mode 100644 index 0000000..cf7b8bb --- /dev/null +++ b/c/l7.c @@ -0,0 +1,21 @@ +#include +#include + +int main() { + int pol; + printf("Enter number: "); + if (scanf("%d", &pol) != 1); + + char st[100] = ""; + int x = 0; + + if (pol >= 100) pol = 99; + + while(x < pol) { + int len = strlen(st); + st[len] = '*'; + st[len + 1] = '\0'; + x++; + printf("%s\n", st); + } +} \ No newline at end of file