|
发表于 2020-5-2 20:27:42
|
显示全部楼层
0:10
1:10
2: a=5 b=5 c=5
3:a=3,b=3,c=6
4:z=x<0?-x:x
5:A:- if (size > 12)
- {
- cost = cost * 1.05;
- flag = 2;
- }
- bill = cost * flag;
复制代码
B:- if (ibex > 14)
- {
- sheds = 3;
- }
- else
- sheds = 2;
- help = 2 * sheds;
复制代码
c:- while (1)
- {
- scanf("%d", &score);
- if (score < 0)
- {
- printf("count = %d\n", count);
- break;
- }
- else
- count++;
- }
复制代码
- #include <stdio.h>
- int main()
- {
- double x=1000,h=1000;
- int n=0;
- do
- {
- x += 1000*0.1;
- h += h * 0.05;
- n++;
- }while(h<x);
- printf("%dÄêoó£¬oúò1μÄí¶×ê¶î3¬1yD¡¼×óã!\n",n);
- printf("D¡¼×óãμÄí¶×ê¶îêÇ:%lf\n",x);
- printf("oúò1μÄí¶×ê¶îêÇ:%lf",h);
- return 0;
- }
复制代码
1:- #include <stdio.h>
- int main()
- {
- double i=4000000;
- int n=0;
- while(i>0)
- {
- i -= 500000;
- i += i * 0.08;
- n++;
- }
- printf("%dÄêoó£¬D¡¼×óã°ü1aáËËùóDμļò2ú£¬Ôù′λØμ½ò»Æ¶èçÏ′¡£¡£¡£",n);
- return 0;
- }
复制代码
2:不会
3:- #include <stdio.h>
- int main()
- {
- int sum=2;
- for(int i=0;i<=24;i++)
- {
- sum *= 2;
- }
- printf("%d",sum);
- return 0;
- }
复制代码 |
|