#include <stdio.h> int main(void) { int n=0,i=0; char c[128]={0}; printf("请输入1个字符串:\n"); gets(c); while(c[n]!='\0'){ n++; } i=n; printf("你输入的字符串是:\n%s\n",c); while(i!=0){ printf(" "); i--; } printf("%d\n",n); return(0); }
[此贴子已经被作者于2017-12-19 20:29编辑过]