#include <stdio.h>
#include <stdlib.h>
/run this program using the console pauser or add your own getch, system("pause") or input loop/
int main(int argc, char *argv[]) {
char gname[16];
float price,money;
int num;
printf("輸入貨物品名:");
gets(gname);
printf("輸入單價:");
scanf("%f",&price);
printf("輸入數量:");
scanf("%d",&num);
money=price*num;
printf("\n");
printf("品名:\t\t單價\t數量\t金額\n");
printf("\t\t:%f\n",price);
printf("\t\t:%d\n",num);
printf("\t\t:%.1f\n\n",money);
system("PAUSE");
return 0;
}