Question
C Programming Language To celebrate the upcoming New Year 2023, Maries store is holding a Midnight sale event to boost sales at the end of
C Programming Language
To celebrate the upcoming New Year 2023, Maries store is holding a Midnight sale event to boost sales at the end of the year. The sales term and conditions are as follows: The top 1 customer with the highest purchase number will get a discount 70%. The 2nd and 3rd highest purchase number will get a 50% discount. The 4th - 6th highest purchase number will get a 30% discount. The 7th - 10th highest purchase number will get a 10% discount. And the rest of them will get a 5% discount. The ranks are sorted descendingly (from the highest to the lowest). Format Input The input consists of 2 lines. The first line consists of an integer N which indicates the number of customers. The second line consists of N number of integer P which indicates each of the customers purchase number. Format Output Print output in 1 line consists of N integer D separated with spaces which indicates the total price amount that need to be paid by the customer after the discount (rounded down)
Constraints 1 N 1000 1 P 1000
Sample Input 1 (standard input) 5 23 12 435 13 32
Sample Output 1 (standard output) 130 16 11 9 8
!! ATTENTION !! 1. Please READ the assignment carefully!! 2. Input and Outpust MUST be EXACTLY the SAME as SAMPLE! - PLEASE READ CAREFULLY THE SAMPLE of INPUT and OUTPUT !! - Do not use void 3. Please use c language and with explanation! 4. Please DO NOT answer if you are not sure of your answer!
please follow the instruction above, and thank you for following the instruction above :)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started