C++的程序输出题~20题~高分

2025-02-27 18:15:34
推荐回答(5个)
回答1:

1.
139
2.
输入9,输出Goodbye;输入不是9输出Hello
3.
输入大于等于10的数输出HelloGoodbye,小于10的输出Goodbye
4.
HeLLo!
5.
The value of x is: 2
The value of x is: 3
The value of x is: 4
The value of x is: 5
The value of x is: 6
The value of x is: 7
The value of x is: 8
The value of x is: 9
The value of x is: 10
The value of x is: 11
The final value of x is: 11
6.
0 1 2 3 4 5 6
7.
The student with a grade of 75 Passed
The student with a grade of 45 Failed
8.
The value of x is 1
The value of x is neither 1,4 nor 6
The value of x is neither 1,4 nor 6
The value of x is 4
The value of x is neither 1,4 nor 6
The value of x is 6
The value of x is neither 1,4 nor 6
The value of x is neither 1,4 nor 6
The value of x is neither 1,4 nor 6
9.
1 2 4 5 6
The final value of x is: 7
10.
20 10
11.
6
12.
123
13.
Initially, x=0
During call to f1, x=13
At the end, x=0
14.
string1 is: How are you?
====================
for (int i=0;string1 != '\0';i++)//明显题目错了,这样就要出现死循环了
cout<===================
15.
119 119 1245052
16.
Hello yo
17.
Boston, MA
18.
什么啊,题目不完整。printStandard()没实现代码。
19.
411
20.
怎么调用??题目不完整。。。

//没人比我先回答吧。。。

回答2:

1题
139
2题
输入9则显示Goodbye不是9则显示Hello
3题
输入一个数小于10显示Goodbye大于则显示
Hello
Goodbye
4题
Hello!
5题
The value of x is: 2
The value of x is: 3
The value of x is: 4
The value of x is: 5
The value of x is: 6
The value of x is: 7
The value of x is: 8
The value of x is: 9
The value of x is: 10
The value of x is: 11
The final value of x is: 11
6题
0 1 2 3 4 5 6
7题
The student with a grade of 75 Passed
The student with a grade of 45 Failed
8题
The value of x is 1
The value of x is neither 1,4 nor 6
The value of x is neither 1,4 nor 6
The value of x is 4
The value of x is neither 1,4 nor 6
The value of x is 6
The value of x is neither 1,4 nor 6
The value of x is neither 1,4 nor 6
The value of x is neither 1,4 nor 6
9题
1 2 4 5 6
The final value of x is: 7
10题
20
10
11题
6
12题
1
2
13题
Initially, x=0
During call to f1, x=13
At the end, x=0
14题
显示 How are you? 死循环
15题
119 119 0012ff7c
16题
Hello yo
17题
10
18题
加上t1.printStandard();以及,Time t1();里错了。应该是Time t1;以后显示的是
The time is:
没有t1.printStandard();函数,所以无法执行。
19题
411
20题
也是缺少increment(i)这个函数,以及addIncrement()函数。不知道要说明什么。

回答3:

1, 139
2, 输入一个数如不等于9,输出Good,否则输出GoodBye
3,输入一个数如大于10,输出Hello“换行”GoodBye,否则GoodBye

4,Hello!
5,The value of x is:2
The value of x is:3
The value of x is:4
The value of x is:5
The value of x is:6
The value of x is:7
The value of x is:8
The value of x is:9
The value of x is:10
The value of x is:11
The final value of x is: 11
6, 0 1 2 3 4 5 6
7, The student with agrade of 75 Passed
The student with agrade of 45 Failed
8, The value of x is 1
The value of x is neither 1,4 nor 6
The value of x is neither 1,4 nor 6
The value of x is 4
The value of x is 6
The value of x is neither 1,4 nor 6
The value of x is 6
The value of x is neither 1,4 nor 6
The value of x is neither 1,4 nor 6
The value of x is neither 1,4 nor 6
9, 1 2 4 5 6
The final value of x is: 7
10,20
10
11,6
12,1
2
3
13,Initially,x=0
During call to f1, x=13
At the end, x=0
14,死循环
15,119 119 0012ff7c
16,Hello yo
17,10
18,The time is:15:22:09
19,822
20,count = 0,increment=1

回答4:

139

要求有输入

要求有输入

Hello

The value of x is:2
The value of x is:3
The value of x is:4
The value of x is:5
The value of x is:6
The value of x is:7
The value of x is:8
The value of x is:9
The value of x is:10
The value of x is:11
The final value of x is:11

七个空格

The student with a grade of 75 Passed
The student with a grade of 45 Failed

The value of x is 1
The value of x is neither 1,4 nor 6
The value of x is neither 1,4 nor 6
The value of x is 4
The value of x is 6
The value of x is neither 1,4 nor 6
The value of x is 6
The value of x is neither 1,4 nor 6
The value of x is neither 1,4 nor 6
The value of x is neither 1,4 nor 6

1 2 4 5 6

20
10

6

2

Initially, x=0
During call to f1, x=13
At the end, x=0

string1 is: How are you?
How are you? How are you? How are you? How are you?....无限

119 119 0x0012ff7c

Hello yo

10

缺少函数定义

411

题目不完整

每题用空格格开

回答5:

老衲闭关多年,近日出关
1, 139
2, 输入一个数如不等于9,输出Good,否则输出GoodBye
3,输入一个数如大于10,输出Hello“换行”GoodBye,否则GoodBye

4,Hello!
5,The value of x is:2
The value of x is:3
The value of x is:4
The value of x is:5
The value of x is:6
The value of x is:7
The value of x is:8
The value of x is:9
The value of x is:10
The value of x is:11
The final value of x is: 11
6, 0 1 2 3 4 5 6
7, The student with agrade of 75 Passed
The student with agrade of 45 Failed
8, The value of x is 1
The value of x is neither 1,4 nor 6
The value of x is neither 1,4 nor 6
The value of x is 4
The value of x is 6
The value of x is neither 1,4 nor 6
The value of x is 6
The value of x is neither 1,4 nor 6
The value of x is neither 1,4 nor 6
The value of x is neither 1,4 nor 6
9, 1 2 4 5 6
The final value of x is: 7
10,20
10
11,6
12,1
2
3
13,Initially,x=0
During call to f1, x=13
At the end, x=0
14,死循环
15,119 119 0012ff7c
16,Hello yo
17,10
18,The time is:15:22:09
19,822
20,count = 0,increment=1