#includefloat M;//M为投入的钱数
int A=1,B=1,t; //A为数量标记,B为金钱标记,1表示有,0表示没有,t用于标记售货机是否能完成退款
int i,n,v=100; //i用于循环显示商品列表,n用于记录输入的货号,v用于保存售货机内可以找零的钱数,初设为v=100
//结构体定义
struct goods //定义物品清单
{
int number;
char name[10];
float price;
int quantity;
}goods[9]={ {1,"可口可乐",3,5},{2,"拿铁咖啡",4,5},{3,"橙汁",3,5},{4,"奶茶",4,5},{5,"雪碧",2.5,5},
{6,"矿泉水",2,5},{7,"椰子汁",2.5,5},{8,"格瓦斯",3,5}};
struct money //定义钱的种类,数量用于记录找零的某值张数
{
float moneys;
int mount;
}money[2]={ {1,0},{0.5,0}};
float show() //显示模块--屏幕
{
system("pause");
putch(\n);
for(i=0;i<8;i++){
printf(" |~~~~~~~~~~~~~~~~~~