正在加载图片...
return 0; 10.读程序,回答问题: #include<iostream> using namespace std; void func(int num,char str[]) int i; cout<"123”; for (size_t i =0;i<num;i++) cout<<str[i]<"; } void main( int i; char str[20]: cin>>i>>str; func (i,str); } 程序编译的可执行文件是test.exe,它的目录是d:\test,则在程序编译运行期间的执 行结果是: 若运行后,在命令行窗口中输入:7 hellosjtu! 输出结果是: 11.下面程序的功能是:求a的b次方,并输出,请填空。 #include<iostream> using namespace std: double func(double a,int b) { int i; double z=1;return 0; } 10.读程序,回答问题: #include<iostream> using namespace std; void func(int num, char str[]) { int i; cout<<"123"; for (size_t i = 0; i<num; i++) { cout<<str[i] <<""; } } void main() { int i; char str[20]; cin>>i>>str; func(i, str); } 程序编译的可执行文件是 test.exe,它的目录是 d:\test,则在程序编译运行期间的执 行结果是: 若运行后,在命令行窗口中输入: 7 hellosjtu! 输出结果是: 11. 下面程序的功能是:求 a 的 b 次方,并输出,请填空。 #include<iostream> using namespace std; double func(double a, int b) { int i; double z=1;
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有