#include <stdio.h>
#include <stdlib.h>
#define p printf
#define s scanf
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char *argv[]) {
char flavors[8][10]={"PEANUT","VANILLA","MINT","CARAMEL","MANGO","cøøkíéS","CHEESE","COFFEE"};
int prices[8]={50,70,35,80,60,110,200,100};
char ans;
int qty, cs[8], x, a, y, b, i;
double total, subtotal = 0;
float prc, tprc=0,amt[8];
do{
//system("cls"); *note: hindi ito gumagana.
system("@cls||clear");
for(a=0;a<8;++a){
total = 0, subtotal = 0, qty = 0;
p("ENTRER NUMBER OF ORDERS FOR %s: ",flavors[a]);
s("%d",&cs[a]);
}
for(b=0;b<8;b++){
qty = cs[b];
subtotal = (qty * prices[b]);
total += subtotal;
p("\nQTY:\tITEM:\tPRICE:\tSUBTOTAL:\n%d\t%s\t%d\t%.2f",cs[b],flavors[b],prices[b],subtotal);
}
p("\n\nTOTAL PRICE: %.2f",total);
p("\nDO YOU WANT TO PROCESS ANOTHER? ");
s("%s",&ans);
}while((ans=='Y')||(ans=='y'));
p("\nTHANK YOU FOR USING THE SYSTEM!");
return 0;
}