|
发表于 2020-8-27 15:53:09
|
显示全部楼层
0. 100
1. 10
2. a
3. a = 14, b = 5, c = 9
4.
5.A.
- if (size > 12)
- {
- cost = cost * 1.05;
- flag = 2;
- }
- bill = cost * flag;
复制代码
B.
- if (ibex > 14)
- {
- sheds = 3;
- }
- sheds = 2;
- help = 2 * sheds;
复制代码
C.
- if (score < 0)
- {
- stage2: printf("count = %d\n", count);
- }
- count++;
- scanf("%d", &score);
复制代码
0.- #include<stdio.h>
- int main()
- {
- int year;
- float jiayu = 10000, heiye = 10000;
-
- while(jiayu >= heiye)
- {
- jiayu += 10000 * 0.1;
- heiye += heiye * 0.05;
- year++;
- }
-
- printf("%d年后,黑夜的投资额超过小甲鱼!\n", year);
- printf("小甲鱼的投资额是:%.2f\n", jiayu);
- printf("黑夜的投资额是:%.2f\n", heiye);
- return 0;
- }
复制代码
1.- #include<stdio.h>
- int main()
- {
- int year, moeny = 400;
-
- while(moeny > 0)
- {
- moeny -= 50;
- moeny += moeny * 0.08;
- year++;
- }
-
- printf("%d年后,小甲鱼败光了所有家产,再次回到一贫如洗......", year);
- return 0;
- }
复制代码
2. |
|