II. Case Café Jolly Soul is a place that sells trendy drinks. The drinks they sell and the drink codes are : Boba Coffe

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

II. Case Café Jolly Soul is a place that sells trendy drinks. The drinks they sell and the drink codes are : Boba Coffe

Post by answerhappygod »

II. CaseCafé Jolly Soul is a place that sells trendy drinks. The drinksthey sell and the drink codes are : Boba Coffee (BC), Moccapucino(MC), Pandan Coffee (PC), Boba Thai (BT), Choco Pandan (CP) andCheese Choco (CC). Cafe Jolly Soul has a program to input order andview sales:
A. First Line, User will input T orders
B. For the next T lines, in each line, User will input thefollowing format: N [Drink Code] N is the order quantity
C. Output will display 2 Top Sales with the following outputformat: 1. [Drink Names] [Sales Amount] 2. [Drink Names] [Sales Amount]
Try implementing Heap into the Café Jolly Soul programusing C
CONSTRAINTS
1≤T≤1001≤N≤100Drink Codes: Boba Coffee (BC), Moccapucino (MC), Pandan Coffee(PC), Boba Thai (BT), Choco Pandan (CP) and Cheese Choco (CC)
Ii Case Cafe Jolly Soul Is A Place That Sells Trendy Drinks The Drinks They Sell And The Drink Codes Are Boba Coffe 1
Ii Case Cafe Jolly Soul Is A Place That Sells Trendy Drinks The Drinks They Sell And The Drink Codes Are Boba Coffe 1 (19.37 KiB) Viewed 10 times
Ii Case Cafe Jolly Soul Is A Place That Sells Trendy Drinks The Drinks They Sell And The Drink Codes Are Boba Coffe 2
Ii Case Cafe Jolly Soul Is A Place That Sells Trendy Drinks The Drinks They Sell And The Drink Codes Are Boba Coffe 2 (30.33 KiB) Viewed 10 times
Do in C
Sample 1: 5 10 BC 5 MC 3 CC 2 BC 21 BT Top Sales: 1. Boba Thai 21 2. Boba Coffee 12
Sample 2: 10 5 BC 3 MC 13 CC 12 BC 2 BT 10 PC 2 PC 4 CP 5 MC 25 MC Top Sales: 1. Moccapucino 33 2. Boba Coffee 17
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply