+ 2
what's the wrong thing in this code
26 Respuestas
+ 2
I've been trying to figure out for ages why the end code won't run, it's because you haven't given input for SM AP LP and PRIZE.
Theres nothing for it to compare 😂
Can you send me that input pls?
+ 2
https://code.sololearn.com/crD5YFJ323TK/?ref=app
Here you go:
C&P this for input:
123
200
lily
124
250
john
125
270
lisa
126
150
nancy
127
100
sara
250
0.8
0.2
1000
+ 1
Your code asks for lots of input. That means the user has to type in the numbers/string whatever for the code to use. I need you to send me a list of that input so I can use it to test your code. i.e. invoice,invoice,name,invoice, invoice,name...
so what I'm asking is what input do you need to get your example output?
0
Can you comment a list of example input so I can run your code?
0
Output Example:
Enter SM = 250
Enter AP = 0.8
Enter LP = 0.2
Enter Prize = 1000.
Full record of Invoices:
Invoice Number Invoice Amount Customer ID
123 200 lily
124 250 John
125 270 lisa
126 150 nancy
127 100 Sara
Full Prize Winner = 1000
Invoice Number Invoice Amount Customer ID
124 250 John
Half Prize Winner = 500
Invoice Number Invoice Amount Customer ID
125 270 lisa
Quarter Prize Winner = 250
Invoice Number Invoice Amount Customer Name
123 200 lily
0
this is what my tutor want to be the output
0
Good to know, I'd like to try and help but could you comment just the Input so I can copy it into the code. I need to run it to find the errors. Annoyingly sololearn demands all input at the start.
0
I don't understand what exactly you want
0
I will send the questions
0
Writing C++ Code for a Hybrid Market Prize System.
A New hybrid market is launching in Muscat and you are asked to create a prize system for the blind customers based on the amount of his invoice.
The scenario of giving the prize is as follow:
The market owner should enter the Secret amount (SM), Above Percentage (AP), Lower Percentage (LP) and Prize at the start of executing the system. [5 Marks ]
The cashier should enter the following information for five customers in a 2D-Array 5 X 3: The Invoice Number, the Invoice Amount, and Customer Name.[10 Marks]
The system needs to print the number and the amount of each invoice with the customer name. In addition to the prize amount, such that: [15 Marks]
o If the Invoice Amount is equal to (SM) the record of the customer should be printed with 100% of the Prize.
o If the Invoice Amount is Larger than (SM) by (AP) the record of the customer should be printed with 50% of the Prize.
o If the Invoice Amount is larger than (SM) by (LP) the record of the customer
0
Cashier
Enter Invoice Number of Customer 1 : 123
Enter Invoice Amount of Customer 1 : 200
Enter Name of Customer 1 : lily
Enter Invoice Number of Customer 2 : 124
Enter Invoice Amount of Customer 2 : 250
Enter Name of Customer 2 : john
Enter Invoice Number of Customer 3 : 125
Enter Invoice Amount of Customer 3 : 270
Enter Name of Customer 3 : lisa
Enter Invoice Number of Customer 4 : 126
Enter Invoice Amount of Customer 4 : 150
Enter Name of Customer 4 : nancy
Enter Invoice Number of Customer 5 : 127
Enter Invoice Amount of Customer 5 : 100
Enter Name of Customer 5 : sara
0
this is the input
0
Thank you. Would you mind putting it in one line so I can c&p.
I.e. 123 200 lily 124
0
123 200 lily 124 250 john 125 270 lisa 126 150 nancy 127 100 sara
0
Thanks 😊
0
I appreciate your help
0
SM=250 AP=0.8 LP=0.2 PRIZE=1000
0
thx alot olivia
0
Your welcome ☺️
0
lots of inputs lol try make it shorter