char wordfirst[]={0xd6,0xc1,0xb5,0xbc,0xd7,0xbc};char wordlast[]={0xd8,0xbf,0xa5,0xdb,0xdc,0xdb}; //分别存放一个字的前半部分和后半部分:“重量”“单价”“总价”char lcd4[16]={0xc9,0xe8,0xbc,0xc6,0xc8,0xcb,0xd4,0xb1,0xa1,0xc3,0xc0,0xb2,0xc0,0xb2,0xc0,0xb2}; //“设计人员:啦啦啦”void main(){ byte data; byte location=0x92; //LCD屏第三行字符显示位置 byte i,j; int l; printf("Press any key to begin!\n\n"); getch(); if(!Startup()) //开启设备 { printf("ERROR: Open Device Error!\n"); return; } printf("press any key to exit\n"); j=16; while(!kbhit()) //运行设备 { printword(); show_0809(); //显示重量 show_value(weight, dValue); //显示总价
1条回答 默认 最新
- threenewbee 2018-12-11 02:54关注
show_value的代码在哪里?
在里面可以修改或者把show_value(weight, dValue);换成
printf("%f kg, %f usd", weight, dValue); //假设这两个变量是float类型的话,double换 %lf,int换 %d解决 无用评论 打赏 举报