A-A+
阅读下列程序 写出程序的运行结果【 】。 include<iostream. h> void
问题详情
阅读下列程序,写出程序的运行结果【 】。
include<iostream. h>
void main() { char str1[ ]: "Hello, World?;
char str2[100];
int i=0;
do{
if (str1[i]>= "a"&& str1[i]<= "z" )
str2[i]=str1[i]-32;
else
str2[i]=strl [i];
i++;
}while(strl[i]!="");
str2[i]="";
cout<<str1<<end1;
cout<<str2<<end1;
}请帮忙给出正确答案和分析,谢谢!
参考答案
正确答案:Hello World!HELLO WORLD!
Hello, World!HELLO, WORLD!