Stepan 2 달 전
부모
커밋
eb54488f64
1개의 변경된 파일21개의 추가작업 그리고 0개의 파일을 삭제
  1. 21 0
      c/l7.c

+ 21 - 0
c/l7.c

@@ -0,0 +1,21 @@
+#include <stdio.h>
+#include <string.h>
+
+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);
+    }
+}