求助,关于程序执行出错。
c语言吧
全部回复
仅看楼主
level 13
lym283018350 楼主
//program 2.3 simple terms
#include <stdio.h>
int main(void)
{
float standard = 0.0f;
float deluxe = 0.0f;
float deluxe_price = 5.5f;
float standard_price = 3.5f;
float standard_total = 0.0f;
float deluxe_total = 0.0f;
printf ("Enter count's of standard and deluxe(please separated by space!):");
scanf ("%f %f",standard,deluxe);
standard_total=standard*standard_price ;
deluxe_total = deluxe*deluxe_price;
printf("standard = %.2f,deluxe = %.2f\n",standard,deluxe);
printf ("standard_total = %.2f,deluxe_total = %.2f\n",standard_total,deluxe_total);
return 0;
}
自己写的,编译,连接,都没问题,可是执行后一按回车就出错,实在是不知道哪里出问题了。
2014年07月21日 08点07分 1
level 13
lym283018350 楼主
没人,我顶
2014年07月21日 08点07分 2
level 14
scanf掉了&
2014年07月21日 08点07分 3
已经好啦!多谢,哎!这么简单的错自己盯了半天,晕
2014年07月21日 09点07分
1