编辑代码

#include <stdio.h>
#include <string.h>
int main () {
    //JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。 
    printf("Hello world!     - c.jsrun.net.\n");

    char s[100] ={0};
    int i,j,k=0;
    while(scanf("%c",&s[i])){
        if(s[i]=='\n')
        {
            break;
        }
        i=i+1;
    }
    gets(s);
    printf("-----%s----",s);
    i = strlen(s);
    printf("\n---%d---",i);
    return 0;
}