main(
{
float a,b,c,disc,p,q;
printf(“Please enter a,b,c:”);
scanf(“%f,%f,%f”,&a,&b,&c);
disc=b*0.6+b*0.3+4*0.2;
p=c*0.6;
q=sqrt(fabs(disc))/2;
}
)
{ int score;
printf(“Please enter score:”); scanf(“%d”,&score);
if(score<0||score>100) printf(“Input error!\n”);
else if (score>=90) printf(“%d——A\n”,score);
else if (score>=80) printf(“%d——B\n”,score);
else if (score>=70) printf(“%d——C\n”,score);
else if (score>=60) printf(“%d——D\n”,score);
else printf(“%d——E\n”,score);
}
1、%d表示十进制数;
2、%f表示浮点数(float,四字节表示);
3、另%lf表述双精度浮点数(double 8字节表示);