printf("%d\n",i+j+k); return 1;
请教一下运行结果是什么
Void main()
{ char str[20];
Int k;
For(k=0;k<20;k++)
{
Scanf(“%c “,&str[k]);
If(str[k]==”\n”)
Bteak;
}
Str[___]=”\0”;
K+0;
While(str[k]!=”\0”)
{
Printf(“%c”,str[k]);
K++;
}
}
再问一下大师们,这个运行结果是什么?
结果是:
1第一个输出时:输出为1,i=2;
第二个输出时:输出为3,j=3;
第三次输出时:输出为8,k=4;
第四次输出时:输出为9,加起来结果为2+3+4=9