Question: completed code but wrong output on one test (c++) Jump to level 1 Integers numsalads and myMoney are read from input. A salad costs 8


Jump to level 1 Integers numsalads and myMoney are read from input. A salad costs 8 dollars. - If numSalads is less than 4, output 'Not enough salads." - If numSalads is greater than or equal to 4 , then declare and initialize int variable totaicost with the product of numSalads and 8. - If totalCost is less than or equal to myMoney, output 'Salads successfully purchased: - Otherwise, output "Need more money to purchase all" - If myMoney is greater than or equal to 8, output 'At least one item was purchased." - If numSalads is greater than 37 , output 'Restocking soon. Otherwise, output 'item still in stock" End with a newline. Ex if the input is 17 158, then the output is: Salads successfully purchased. At least one item was purchased. Item still in stock. \#include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
