|
发表于 2020-10-3 16:11:09
|
显示全部楼层
0.10
1.11
2.a,b,c
3.3, 9, 14
4.
5.
#include <stdio.h>
int main() {
int size;
float bill, flag, cost = 0.00;
for (size = 0; size <= 50; size++)
{
if (size > 12)
{
cost *= 1.05;
flag = 2;
}
else
{
bill = cost * flag;
}
}
return 0;
}
#include <stdio.h>
int main()
{
int ibex, sheds, help;
for (ibex = 0; ibex <= 50; ibex++)
{
if (ibex > 14)
{
sheds = 3;
}
else
{
sheds = 2;
help = 2 * sheds;
}
}
return 0;
}
#include <stdio.h>
int main()
{
int score, count;
for (count = 0; count <= 50; count++)
{
scanf("%d", &score);
if (score < 0)
{
printf("count = %d\n", count);
}
}
return 0;
}
0.
#include <stdio.h>
#include <math.h>
void main()
{
float year = 0, P = 10000, F1, F2;
float i1 = 0.1, i2 = 0.05;
do
{
year++;
F1 = P * (1 + year * i1);
F2 = P * pow((1 + i2),year);
}while (F2 < F1);
printf("%.0f年后,黑夜的投资额超过小甲鱼\n", year);
printf("小甲鱼的投资额是: %.2f\n", F1);
printf("黑夜的投资额是: %.2f\n",F2);
|
|