struct trade_info
{
float Litre_Price; /*every one litre gas' price.*/
int Machine_Num;/*gas station machine number.*/
int Gas_Number; /*define gas type.*/
float Trade_Cost;/*the amount of cost.*/
float Trade_quantity;/*the amount of quantity. */
char Payment_Type[19];/*which ways to payment such as Visa, IC, Cash.*/
char Card_Id[19];/*Visa Card or IC Card.*/
char Card_Password[5];
void initialize();
};
int Gas_Type_Screen();
#endif
void trade_info::initialize(trade_info p_stuct)
{
p_stuct.Litre_Price=0; /*every one litre gas' price.*/
p_stuct.Machine_Num=0;/*gas station machine number.*/
p_stuct.Gas_Number=0; /*define gas type.*/
p_stuct.Trade_Cost=0;/*the amount of cost.*/
p_stuct.Trade_quantity=0;/*the amount of quantity. */
};
int Gas_Type_Screen()
{
int gasnum=0;
clrscr();
gotoxy(24,20);
printf("PLEASE INPUT GAS TYPE NUMBER(ex:97)");
gotoxy(24,21);
scanf("%i",&gasnum);
gotoxy(24,22);
printf("%i",gasnum);
return gasnum;
}