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
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