Please help me code this am struggling | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Please help me code this am struggling

you are a ticket seller.You have 20 tickets to sell to 30 people wanting to go to a concert this december 2018.write a program using any of the control statements that tracks the number of tickets sold.The gender and age group the ticket are sold to.The tickets should not be sold to anybody younger than 16

16th Sep 2018, 8:28 AM
Madiala Stephen
6 Answers
+ 9
Your attempts?
16th Sep 2018, 8:35 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 9
you should start with your number of tickets and create a conditional statement that checks the age of the customer using a random numbers in given range. If the customer is greater or equal to 16 then minus 1 of the tickets keep checking this untill you have ran out of tickets. store all your customer ages inside an array and then using conditional statements to check age groups and tickets sold ignoring those that are less then 16
16th Sep 2018, 9:01 AM
D_Stark
D_Stark - avatar
+ 1
TABLE Tickets buyers(female) Ticket buyers age group(16-21) Number of tickets sold(5) Tickets buyers(female) Ticket buyers age group(22-35) No.of tickets sold(5) Tickets buyers(Male) Tickets buyers age group(16-21) Number of Tickets Sold (6) Tickets buyers(Male) Tickets buyers age group(22-35) Number of tickets sold(4)
16th Sep 2018, 8:31 AM
Madiala Stephen
0
my attempts?
16th Sep 2018, 8:35 AM
Madiala Stephen
0
ohh to help me code it...
16th Sep 2018, 8:36 AM
Madiala Stephen
0
using which statement?
24th Sep 2018, 2:28 PM
Madiala Stephen