You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
printf("enter name of customer:\n");
scanf("%s",name);
total=choclates+biscuits+cooldrinks;
printf("============================================================");
printf("\n M.P - S U P E R M A R K E T \n");
puts("\n============================================================");
printf("Name of customer (Mr/Ms):%s\n",name);
#include<stdio.h>
int main() {
int item,choclate,choclates,biscuit,biscuits,cooldrink,cooldrinks,total;
time_t t;
t = time(NULL);
struct tm tm;
tm = *localtime(&t);
char name[20];
choclate=10;
printf("enter no.of choclates:");
scanf("%d",&item);
choclates=choclateitem;
biscuit=5;
printf("enter no.of biscuit:");
scanf("%d",&item);
biscuits=biscuititem;
cooldrink=75;
printf("enter no.of cooldrinks:");
scanf("%d",&item);
cooldrinks=cooldrink*item;
printf("enter name of customer:\n");
scanf("%s",name);
total=choclates+biscuits+cooldrinks;
printf("============================================================");
printf("\n M.P - S U P E R M A R K E T \n");
puts("\n============================================================");
printf("Name of customer (Mr/Ms):%s\n",name);
printf("Item Qty Price Amount\n");
printf("choclate %d %d %d.Rs\n",item,choclate,choclates);
printf("biscuit %d %d %d.Rs\n",item,biscuit,biscuits);
printf("cooldrink %d %d %d.Rs\n",item,cooldrink,cooldrinks);
printf("Total payable amount=%d.Rs\n",total);
printf("****\n");
printf(" THANKS FOR VISITING ");
printf("Current Time: %d:%d:%d", tm.tm_hour, tm.tm_min, tm.tm_sec);
return 0;
}
The text was updated successfully, but these errors were encountered: