}
Music(L_bai); while(!BUSY);
Music((int)(sumofprice/10)+1); while(!BUSY); Music(L_shi); while(!BUSY);
Music((int)(sumofprice)+1); while(!BUSY); Music(L_dian); while(!BUSY);
Music((int)(sumofprice*10)+1); while(!BUSY);
Music((int)(sumofprice*100)+1);
else if((int)(sumofprice) == 0&&sumofprice>1) {
if((int)(sumofprice*10) == 0 && { } else {
while(!BUSY);
Music((int)(sumofprice/10)+1); while(!BUSY); Music(L_shi); while(!BUSY); Music(L_dian); while(!BUSY);
Music((int)(sumofprice*10)+1); while(!BUSY);
Music((int)(sumofprice/10)+1); while(!BUSY); Music(L_shi);
(int)(sumofprice*100) == 0)
}
}
while(!BUSY);
Music((int)(sumofprice*100)+1);
else if(sumofprice > 10) { }
else if((int)(sumofprice*10) == 0 &&
{
while(!BUSY);
Music((int)(sumofprice)/10+1); while(!BUSY); Music(L_shi); while(!BUSY);
Music((int)(sumofprice)+1); while(!BUSY); Music(L_dian); while(!BUSY);
Music((int)(sumofprice*10)+1); while(!BUSY);
Music((int)(sumofprice*100)+1);
(int)(sumofprice*100) == 0)
}
else if(sumofprice > 1) {
while(!BUSY); while(!BUSY);
Music((int)(sumofprice)+1);
Music((int)(sumofprice)+1); while(!BUSY); Music(L_dian); while(!BUSY);
Music((int)(sumofprice*10)+1); while(!BUSY);
}
}
}
Music((int)(sumofprice*100)+1);
//0.01~0.99的情况
else if(sumofprice > 0) { }
else// 0 的情况 { }
while(!BUSY); Music(L_yuan);
while(!BUSY); Music(L_0); while(!BUSY); Music(L_0); while(!BUSY); Music(L_dian); while(!BUSY);
Music((int)(sumofprice*10)+1); while(!BUSY);
Music((int)(sumofprice*100)+1);
weightL=weight;
value = key_scan(); if(value == 13) { }
if(value == 11) //设置单价 单价格式必须为XX.X的
LCDClear(); ZeroWeight = res;
LCDDispString(4,1,\gFlag = 0; delayms(500); LCDClear();
{ LCDClear();
} }
}
LCDDispString(4,1,\LCDDispString(7,2,\for(i = 0;i<4;i++) keyvalue[i]=0; i = 0;//记录按下的按键的对应位数
value = key_scan();
while(value == 16)//没有键按下
value = key_scan(); //读取按键值 keyvalue[0] = value; LCDDispNum(7,2,value); delay(500); value = key_scan();
while(value == 16)//没有键按下
value = key_scan(); //读取按键值 keyvalue[1] = value; LCDDispNum(8,2,value); delay(500); value = key_scan();
while(value == 16)//没有键按下
value = key_scan(); //读取按键值 keyvalue[3] = value; LCDDispNum(10,2,value); while(value!=12)
value = key_scan();
Price = keyvalue[0]*10+keyvalue[1]+keyvalue[3]*0.1; LCDClear();