-
Signaling devices required on inflatable liferafts include a(n) ().
A . Very pistol
B . orange smoke signal
C . air horn
D . lanter
-
1)#include 2)using namespace std; 3)int main() 4){ 5)int a,b,result; 6)cout<<"please input two numbers:
"; 7)cin>>a>>b; 8)result=3*a-2*b+1; 9)cout<<"resultis" << result << endl; 10)} 程序执行到第8行时,假设此时输入“4空格5”,则a的值是:()
A . A.0
B . 4
C . 5
D . 不确定
-
()gives a description of the combined Cardinal and Lateral Buoyage system including textual and diagrammatic explanations of the five types of marks;lateral;cardinal,isolated danger;safe water and special marks.
A . Ocean Passages for the World
B . Symbols and Abbreviations used on Admiralty Charts,Chart 5011
C . IALA Maritime Buoyage System
D . The Mariners Handbook
-
1)#include 2)using namespace std; 3)int main() 4){ 5)int a,b,result; 6)cout<<"please input two numbers:
"; 7)cin>>a>>b; 8)result=3*a-2*b+1; 9)cout<<"resultis" << result << endl; 10)} 程序的输出结果是:()
-
#include void main ( ){ int n = 4 ;while (n--)printf (%d,--n); }
-
下面程序的输出结果是______。 #include void main() { int n=9; while(n > 6){n--; printf(%d,n);} }
-
34. _____ gives a description of the combined Cardinal and Lateral Buoyage system including textual and diagrammatic explanations of the five types of marks; lateral;isolated danger;safe water and special marks.
-
06410141:下面程序的运行结果是()。#include #include int main( ){char x[80]=\AB\, y[80]=\LMNP\;int n=0;strcat(x, y);while (x[n++]!='
-
下列程序的输出结果是()。include<stdio.h>include<string.h>main(){ char a[]="\n123\\"; printf("%d,%d\n",strlen(A) ,sizeof(A) );}
A.5,6
B.5,5
C.6,6
D.6,5
-
有如下程序:include<iostream.h>long fib(int n){if(n>2)return(fib(n-1)+fib(n-2)); else retu
有如下程序: include<iostream.h> long fib(int n) { if(n>2)return(fib(n-1)+fib(n-2)); else return(2);} void main() {cout<<fib(3);} 该程序的输出结果是
A.2
B.4
C.6
D.8
-
下面程序的输出是()。define N 3define M(n) ((N+1)*n)include <iostrearn.h>void main(){int
下面程序的输出是()。define N 3define M(n) ((N+1)*n)include <iostrearn.h>void main(){ int z=2*(N+M(5+1)); cout<<z<<end1;}
A.42
B.48
C.54
D.编译报错
-
下列程序的输出结果是()。 include<stdio.h> include<string.h> main() { char a[]="\n123\\"; printf("%d,%d\n",strlen(a),sizeof(a)); }
A.5,6
B.5,5
C.6,6
D.6,5
-
有如下程序:include<iostream>using namespace std;long fun(int n){if(n>2)return(fun(n-1)+fu
有如下程序: include<iostream> using namespace std; long fun(int n) { if(n>2) return(fun(n-1)+fun (n-2)); else return 2; } int main() { cout<<fun(3)<<end1; return 0; } 则该程序的输出结果应该是 ()。
A.2
B.3
C.4
D.5
-
找出10个字符串中的最大者。 include include define N 10 void main(); }
-
写出下面程序执行后的运行结果。 include <stdio.h> define N 2 define M N+1 define N
写出下面程序执行后的运行结果。 include <stdio.h> define N 2 define M N+1 define NUM 2*M+1 int main() { int i; for(i=1;i<=num;i++) printf("%d",i); return 0; }>
-
有以下程序:include<iostresm.h>void main(){int n;cin>>n;if (n++<10)cout<<n<<endl;elsecout<
有以下程序: include<iostresm.h> void main() { int n; cin>>n; if (n++<10) cout<<n<<endl; else cout<<n--<<endl; } 若执行上述程序时,从键盘上输入9,则输出结果是()。
A.11
B.10
C.9
D.8
-
阅读以下说明和C++程序,将应填入(n)处的字句写在对应栏内。【C++程序】include < stdio. h >include
阅读以下说明和C++程序,将应填入(n)处的字句写在对应栏内。
【C++程序】
include < stdio. h >
include < string. h >
define Max 1000
class Bank
{
int index;
char date [Max] [10]; // 记录交易日
iht amount[Max]; // 记录每次交易金额,以符号区分存钱和取钱
int rest[ Max]; // 记录每次交易后余额
static iht sum; // 账户累计余额
public:
Bank() {index =0;}
void deposit(char d[ ] , int m) //存入交易
{
strcpy (date [ index ], d);
amount[ index] = m;
(1);
rest[ index] = sum;
index++;
}
void withdraw (char d[ ], int m) //取出交易
{
strcpy(date[ index] ,d);
(2);
(3);
rest[ index] = sum;
index++;
}
void display();
};
int Bank:: sum = 0;
void Bank:: display () //输出流水
{
int i;
printf("日期 存入 取出 余额\n");
for (4)
{
printf(" %8s" ,date[i] );
if (5)
printf(" %6d" , -amount[i] );
else
printf("%6d ",amount[i] );
printf("% 6d\n" ,rest[i] );
} }
void main()
{
Bank object;
object. deposit ("2006.2.5", 1 00 );
object. deposit("2006.3.2" , 200);
object. withdraw("2006.4.1", 50);
object. withdraw("2006.4.5", 80);
object. display ();
}
本程序的执行结果如下:
日期 存入 取出 余额 2006.2.5 100 100
2006.3.2 200 300
2006.4.1 50 250
2006.4.5 80 170
-
有以下程序:include<stdio.h>main(){int k=4,n=0; for(;n<k;) { n++; if(n%3!=0)continue; k--
有以下程序: include <stdio.h> main() { int k=4,n=0; for(;n<k;) { n++; if(n%3! =0) continue; k--;} printf("%d,%d\n",k,n); } 程序运行后的输出结果是()。
A.1,1
B.2,2
C.3,3
D.4,4
-
______ gives a description of the combined Cardinal and Lateral Buoyage system including textual and diagrammatic explanations of the five types of marks;lateral;cardinal,isolated danger;safe water and special marks.
A.Ocean Passages for the World(NP136)
B.Symbols and Abbreviations used on Admiralty Charts,Chart 5011
C.IALA Maritime Buoyage System(NP735)
D.The Mariners Handbook(NP100)
-
有以下程序:include <iostream>using namespace std;int main (){ int n; cin>>n; if (n++<10)c
有以下程序: include <iostream> using namespace std; int main () { int n; cin>>n; if (n++<10) cout<<n<<end1; else cout<<n--<<end1; return 0; } 若执行该程序时从键盘上输入9,则输出结果是()。
A.11
B.10
C.9
D.8
-
有如下程序:include<iostream>using namespace std;class Test{public:Test(){n+=2;}~Test(){n-
有如下程序: include<iostream> using namespace std; class Test{ public: Test() {n+=2;} ~Test() {n-=3;} static int getNum(){return n;} private: static int n; }; int Test::n=1; int main() { Test* p=new Test; delete p; cout<<"n="<<Test::getNum()<<endl; return0; } 执行后的输出结果是()。
A.n=0
B.n=1
C.n=2
D.n=3
-
include<iostream.h> void main() { int n=9; while(n>6) { n--; cout < < n;} } 该程
include<iostream.h> void main() { int n=9; while(n>6) { n--; cout < < n;} } 该程序的输出结果是
A.987
B.876
C.8765
D.9876
-
1)include<iostream><iostream>2)using namespace std;3)int main()4){5)int a,b,result;6)cout<<"please input two numbers:";7)cin>>a>>b;8)r
A.0
B.4
C.5
D.不确定
-
16、下面程序的功能是从键盘输入一行字符(最长不超过80字符),用函数编程统计其中单词(以空格作为间隔符的字符串)的个数。 基本思路是:当前被检验字符不是空格,而前一被检验字符是空格,则表示有新单词出现。按要求在空白处填写适当的表达式或语句,使程序完整并符合题目要求。(下面答案中两个单引号''中间都有一个空格) 样例1: Input a string:How are you↙ Numbers of words = 3 样例2: Input a string: How are you↙ Numbers of words = 3 include <stdio.h> int CountWords(char str[]); int main() { char str[81]; int num; printf("Input a string:\n"); gets(str); num=CountWords(str); printf("Number of w
A.第17行: str[0] != ' ' 第21行: str[i]!=' ' && str[i-1] == ' ' 第25行: i++
B.第17行: str[0] == ' ' 第21行: str[i]!=' ' || str[i-1] == ' ' 第25行: i++
C.第17行: str[0] != '\0 ' 第21行: str[i]==' ' && str[i-1] == ' ' 第25行: i++
D.第17行: str[0] != ' ' 第21行: str[i]!=' ' && str[i-1] != ' ' 第25行: num++