+ 11

Code coach Challenge Super Sale

The fourth test case is failing....please modify my code: https://code.sololearn.com/c56CW8Ei81er/?ref=app

11th Sep 2020, 10:10 AM
Gorom_Pani - avatar
6 Answers
+ 2
AteFish🇧🇩 You're supposed to read doubles from the stringstream,not integers. Modify the for loop in line 13 to this: for(double x;ss>>x;){ ... }
11th Sep 2020, 4:56 PM
Anthony Maina
Anthony Maina - avatar
+ 7
Your favorite store is having a sale! You pay full price for the most expensive item that you get, but then you get 30% off of everything else in your purchase! How much are you going to save? Sales tax is 7%. Also, you leave anything below a dollar in your saving as a tip to the seller. If your saving is a round amount, you don't leave any tips. Task: Given the prices of items you want to purchase, determine how much you will save during your shopping! Input Format: An string of numbers separated by commas that represent the prices for all of the items that you want to purchase (without tax). Output Format: An integer number that represents the total savings that you got for shopping during the sale. Sample Input: 100.25,80.99,40.00 Sample Output: 38 Master Genius
11th Sep 2020, 10:19 AM
Gorom_Pani - avatar
+ 3
AteFish🇧🇩 Can you please share question, I am not a pro ?
11th Sep 2020, 10:17 AM
Master Genius [ INACTIVE ]
Master Genius [ INACTIVE ] - avatar
+ 3
Anthony Maina Thanks bro
12th Sep 2020, 7:51 AM
Gorom_Pani - avatar
- 2
12th Sep 2020, 7:41 PM
- 2
13th Sep 2020, 3:01 AM
kuldeep Singh
kuldeep Singh - avatar