Used words

booths open: %d people coming: Booth %d\n Name: %s from line %d Tickets bought: %d Time of checkout: %d\n Memory allocation failed.\n Enter Customer Information:\n Name: %s Number of Tickets: Arrival time: #include #include #include #define MAX_NAME 51#define MAX_CUSTOMERS 500000#define MAX_QUEUES 12#define MAX_BOOTH 13typedef struct customer_s { char nameMAX_NAME int num_tickets arrival_time line_number} customer_ttypedef node_s customer_t* customer node_s* next} node_ttypedef queue_s node_t* front back} queue_tvoid enqueue(queue_t* queue customer)customer_t* create_customer()customer_t* dequeue(queue_t* queue)customer_t* peek(queue_t* queue)int empty(queue_t * size(queue_t* main() booths = 0 people openQueues queueQuotient queueRemainder // Read the number of and coming printf() scanf(&booths) scanf( &people) Initialize queues queue_t* queuesMAX_BOOTH for(int i < MAX_BOOTH i++){ queuesi (queue_t*)malloc(sizeof(queue_t)) queuesi->front NULL queuesi->back } booths_queuesbooths booths i++ ){ booths_queuesi booths_queuesi->front booths_queuesi->back people new_customer create_customer() queue_number new_customer->name0 % 13 if (queue_number == 0) min_queue_size MAX_CUSTOMERS for (int j j++) (size(queuesj) != && size(queuesj) min_queue_size) j size(queuesj) new_customer->line_number queue_number enqueue(queuesqueue_number new_customer) else{ new_customer->line_number=queue_number Process to if(size(queuesi) 0){ openQueues++ / 1 i<=booths if(queueRemainder queueQuotient j++){ if(booths_queuesi-1->front NULL){ booths_queuesi-1->front queuesi*j->front booths_queuesi-1->back->next if(i <= queueRemainder){ queueQuotient+1 customers print checkout time each customer printf( i+1) while(booths_queuesi->front dequeue(booths_queuesi) printf(customer->namecustomer->line_numbercustomer->num_tickets customer->arrival_time *5 +30) queuesi->front=queuesi->front->next =0 i node_t *temp malloc(sizeof(node_t)) if(queuesi->front while(queuesi->front temp queuesi->front free(temp->customer) free(queuesi) return 0}customer_t* create_customer() (customer_t*)malloc(sizeof(customer_t)) (new_customer NULL) Error handling failed memory allocation printf( ) exit(1) new_customer->name) &new_customer->num_tickets) &new_customer->arrival_time) line new_customer}void customer) new_node (node_t*)malloc(sizeof(node_t)) new_node->customer new_node->next (queue->back queue->front new_node else queue->back->next queue->back new_node}customer_t* queue) (queue->front queue->front temp->customer queue->front->next free(temp) customer}customer_t* queue->front->customer}int queue){ if(queue->front 0}int size(queue_t *queue) count *current while (current count++ current current->next count}
Create your own
... AND SHOP IT!

Hey, your artwork is awesome!

Did you know that you can easily buy one of these cool products?

Share your Artwork