error C2296: '%' : illegal, left operand has type 'const double '这是什么意思
#include<stdio.h>voidmain(){floatp,w,s;intn;s=p+w;switch(n){case1:printf("%f",s=w*(12...
#include<stdio.h>
void main()
{
float p,w,s;
int n;
s=p+w;
switch(n)
{
case 1:printf("%f",s=w*(12*1*0.63%+1));break;
case 2:printf("%f",s=w*(12*2*0.66%+1));break;
case 3:printf("%f",s=w*(12*3*0.69%+1));break;
case 5:printf("%f",s=w*(12*5*0.75%+1));break;
case 8:printf("%f",s=w*(12*8*0.84%+1));break;
}
} 展开
void main()
{
float p,w,s;
int n;
s=p+w;
switch(n)
{
case 1:printf("%f",s=w*(12*1*0.63%+1));break;
case 2:printf("%f",s=w*(12*2*0.66%+1));break;
case 3:printf("%f",s=w*(12*3*0.69%+1));break;
case 5:printf("%f",s=w*(12*5*0.75%+1));break;
case 8:printf("%f",s=w*(12*8*0.84%+1));break;
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询