|
发表于 2021-3-24 11:51:04
|
显示全部楼层
0:100
1:9
2:c
3:a= 17 b=6 c=11
4:
#include<stdio.h>
int main(){
double x,z;
printf("enter a number");
scanf("%lf",&x);
if(x>=0){
z=x;
}else{
z=-x;
}
printf("The positive number is %.9lf\n",z);
return 0;
}
5:A: if(size>12){
ost = cost * 1.05;
flag = 2;
bill = cost * flag;
}else{
bill = cost * flag;
}
}
B:if (ibex > 14)
{
sheds = 3;
help = 2 * sheds;
}else{
sheds = 2;
help = 2 * sheds;
}
C: int count=-1,score=0;
while(score>=0){
scanf("%d",&score);
count++;
}
printf("count = %d\n",count);
return 0;
|
|