已采纳回答 / 慕斯卡2534401
先把97改成a是把前一项赋值给后面一项(注意符号间隔) 例如:#include <stdio.h>int main(){ char c = 'a'; int n = c; //将c赋值给n float f = n; //将c赋值给f double d = f; //将c赋值给d printf("%d\n",n); printf("%f\n",f); printf("%lf\n",d); return 0; }#i...
2018-11-25
最新回答 / 乐莫乐兮新相识
#include <stdio.h>void money(int down,int up){ float t=13.0; if(down>=23&&up<=5) { t=2*(t+1+9*2.3*(1+0.2)); } else if(down<23||up>5) { t=t+1+9*2.3*(1+0.2)+t+1+9*2.3; } else t=(t+1+9*2.3)*2...
2018-11-25
已采纳回答 / 御神_天照
double 类型使用%f格式会导致输入值错误,换成%lf就可以了。#include<stdio.h>#include<math.h>double area(double a,double b){ double s=a*b; return s;}int main(){ double a, b ,s; printf("how much is your long"); scanf("%lf",&a); printf("how much is your wide"); scanf...
2018-11-24