|
发表于 2019-3-15 13:21:39
|
显示全部楼层
0. 100
1. 12
2. a,b,c
3. 14,4,9
4.
- #include <stdio.h>
- int main()
- {
- int x = -5;
- int z;
-
- printf("%d", z = x > 0 ? x : - x);
-
- return 0;
- }
复制代码
5.
A.
- if (size >12 )
- {
- cost = cost * 1.05;
-
- };
- flag = 2;
- bill = cost * flag;
复制代码
B.
if (ibex >14)
{
sheds = 3;
};
sheds = 2;
help = 2 * shed;
C.
- while(scanf("%d", &score))
- {
-
- if (score < 0)
- {
- printf("count = %d\n", count);
- break;
- } ;
-
- count++;
-
- };
复制代码
动动手
0.
- #include <stdio.h>
- int main()
- {
- double j = 10000;
- double h = 10000;
- int i = 0;
-
- do{
-
- h *= 1.05;
- j += 10000 * 0.1;
- ++ i;
- }while (j > h);
-
- printf("%d年后,黑夜的投资额超过小甲鱼!\n", i);
- printf("小甲鱼的投资额是:%.2f\n", j);
- printf("黑夜的投资额是:%.2f\n", h);
- }
复制代码
1.
- #include <stdio.h>
- int main()
- {
- double p = 4000000;
- double i = 0.08;
- int j = 0;
-
- do
- {
- p = p * (1 + i) - 500000;
- printf("%.2f\n", p);
- j ++;
-
- }
- while(p > 500000);
-
- printf("%d年之后,小甲鱼败光了所有家产,再次回到一贫如洗。。。。。\n", j);
-
- return 0;
- }
复制代码
2.
|
|