Write a console-based C++ program that requests the user to input a single positive integer

User Generated

pyrnerqznff066

Programming

Description

Write a console-based C++ program that requests the user to input a single positive integer as input and waits until the student presses the Enter key:

The program will then write the following output according to the following rules:

1. If the number is divisible by 3. The program will give the output "Number: # - Fizz"

Please enter a number, then press Enter key: 6

Output: Number: 6 - Fizz

2. If the number is divisible by 5. The program will give the output "Number: # - Buzz"

Please enter a number, then press Enter key: 10

Output: Number: 10 - Buzz

3. If the number is both divisible by 3 and 5. The program will give the output "Number: # - FizzBuzz"

Please enter a number, then press the Enter Key: 30

Output: Number: 30 - FizzBuzz

4. If the number is NOT divisible by either 3 or 5, the program will give the output " Number: # - Sorry"

Please enter a number, then press Enter key: 8

Output: Number: 8 - Sorry

Expand the application to repeat the process until the user enters "end".

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Ok,refer to t...


Anonymous
Excellent resource! Really helped me get the gist of things.

Studypool
4.7
Indeed
4.5
Sitejabber
4.4

Related Tags