本帖最后由 活力无极限1944 于 2017-11-18 20:30 编辑
0,10个
1,0个
2,a b c
3,a=14,b=5,c=9
4, z = x >= 0 ? x : -x;
5,Aif (size > 12)
{
cost = cost * 1.05;
flag = 2;
}
bill = cost * flag;
Bif (ibex > 14)
{
sheds = 3;
}
else
{
sheds = 2;
}
help = 2 * sheds;
Cscanf("%d", &score);
while (score >= 0)
{
count++;
scanf("%d", &score);
}
printf("count = %d\n", count);
0,#include <stdio.h>
#include <math.h>
int main()
{
float i, j;
int n;
for (n = 1; ;n++)
{
i = 10000 * 0.1 * n + 10000;
j = 10000 * pow(1 + 0.05 , n);
if (j > i)
{
break;
}
}
printf("%d年后,黑夜的投资额超过小甲鱼!\n", n);
printf("小甲鱼的投资额是:%.2f\n", i);
printf("黑夜的投资额是:%.2f\n", j);
return 0;
}
1,#include <stdio.h>
int main()
{
int n;
float i;
for (n = 2, i = 350; ;n++)
{
i = i * (1 + 0.08) - 50;
if (i <= 0)
{
break;
}
}
printf("%d年之后,小甲鱼败光了所有的家产,再次回到一贫如洗……\n", n);
return 0;
}
|