题目内容

下面程序的功能是希望根据输入的半径r计算出圆面积s和周长d,请进行程序填空。#include using namespace std;int main(){ const float PI = 3.14; float r = 0,s = 0,d = 0; cout<>______ ; s = ______ ; d = ______ ; cout<

查看答案
更多问题

以下程序运行结果是______ #include using namespace std;double f(int n){ int i; double s=1.0; for(i=1; i<=n; i++) s+=1.0/i; return s;}int main( ){ int i, m=3; double a=0.0; for(i=0; i

以下程序的运行结果是______ #include using namespace std;int main(){ int x=0,y=5,z=3; while (z-->0&&++x<5) y=y-1; cout<

有以下程序段 char st[20]="hello\0\t\\";printf("%d%d\n",strlen(st),sizeof(st)); 输出结果是( )。

A. 9 9
B. 5 20
C. 13 20
D. 20 20

程序段 char s[ ]=”\tstring\n”; printf(“%d”,strlen(s));的运行结果是( )。

A. 8
B. 9
C. 10
D. 11

答案查题题库