Question: Write a C++ program using only while loops (do-while or for loops are not allowed) to determine the respective categories of N items on Emmas

Write a C++ program using only while loops (do-while or for loops are not allowed) to determine the respective categories of N items on Emmas shopping list using the following rule: Based on the rank of the item on the shopping list (1, 2, 3... N) If the rank is divisible by X, it is a Category 1 item. If the rank is divisible by Y, it is a Category 2 item. If the rank is divisible by both X and Y, it is a Category 3 item. If the rank is not divisible by both X and Y, it is a Category 4 item where X and Y are two integer inputs given to your program by the user. Your program should be able to run as many times as the user wants. Input and Input Validation: The user will provide your program with integers values X, Y, and N. With respect to the input values if the logic: 1X

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!