Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions

Question

25.0 m C B A 52.0 m 65.0 m

Answered: 1 week ago