浏览代码

add l10.c

Stepan 2 月之前
父节点
当前提交
1ee49b6e78
共有 1 个文件被更改,包括 16 次插入0 次删除
  1. 16 0
      c/l10.c

+ 16 - 0
c/l10.c

@@ -0,0 +1,16 @@
+#include <stdio.h>
+#include <string.h>
+
+int main() {
+    char str[100];
+    printf("Enter phrase ");
+    scanf("%s", str);
+    int len = strlen(str);
+    if(len > 50) {
+        printf("too long");
+        return 0;
+    }
+    for(int i = 0; i < len; i++) {
+        printf("%c\n", str[i]);
+    }
+}