Stepan 2 月之前
父節點
當前提交
df0149d828
共有 1 個文件被更改,包括 16 次插入0 次删除
  1. 16 0
      c/l9.c

+ 16 - 0
c/l9.c

@@ -0,0 +1,16 @@
+#include <stdio.h>
+#include <string.h>
+
+int main() {
+    char pol[100];
+    printf("Enter word ");
+    scanf("%s", pol);
+    int len = strlen(pol);
+    if(len > 50) {
+        printf("Error: too long\n");
+        return 0;
+    }
+    strrev(pol);
+    printf("Reversed: %s\n", pol);
+    return 0;
+}