问题标题: 1161

0
0

1
已采纳
张睿杰
张睿杰
初级天翼
初级天翼
定义字符数组zf[101];
定义整形len;
scanf("%s",zf);
len=strlen(zf);
输出len

头文件

#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>

 

1
吴知玄
吴知玄
新手光能
新手光能
    头文件:

    #include <iostream>

    #include <cstring>

    定义char型数组a下标为[500];
    定义int型 s赋给0,用于计数;
    gets(a);//输入a
    for(int i=1;i<=strlen(a);i++)//for循环从1到a结束
    {
        s自增1:s++;
    }
    用cout输出s;
0
我要回答