Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Management Information System Expert

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:

Please enter number, then press Enter key: 8

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"

Note. If the number is NOT divisible by either 3 or 5, the program will give the output "Please enter another number."

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

Output: Number: 30 - FizzBuzz

Expand the application to accept a comma separated list of numbers and print the output of each number according to the rules above.

Example: Please enter an array of number(s): 3,10,30

Output: Number: 3 - Fizz, Number: 10 - Buzz, Number: 30 - FizzBuzz

Note. Utilize pointers where appropriate.

Modify the FizzBuzz program developed in Week Two to record the user input using an array. The function must have the prototype int FizzBuzz(int, int), where the function takes the row number input from user as the first parameter and the column input amount by the user as secondparameter. Create the function to output the number of guesses user takes until they get a FizzBuzz output.

Replace this code in the body of your program with a switch statement. When the user successfully enters a number that gets desired FizzBuzz ouput, prompt to ask if the user wants to play again.

Include the proper header and make sure you properly comment your program. Also, make sure you use proper coding conventions.

Modify the FizzBuzz program further by designinga class CFizzbuzz with two private data members that store a name up to 14 characters long and an integer item number. Define a getFizzbuzz() function member of the CFizzbuzz class that will set values for the data members by reading input from the keyboard and a putFizzbuzz() function member that outputs the values of the data members.

Implement the getRecord() function so that a calling program can detect when a zero item number is entered. Test your CFizzbuzz class with a main() function that reads and outputs CFizzbuzz objects until a zero item number is entered.

Include the proper header and make sure you properly comment your program. Also, make sure you use proper coding conventions.

Management Information System, Management Studies

  • Category:- Management Information System
  • Reference No.:- M92097534

Have any Question?


Related Questions in Management Information System

Assignment erm roadmapthe following material may be useful

Assignment : ERM Roadmap The following material may be useful for the completion of this assignment. You may refer to the documents titled "Embracing Enterprise Risk Management: Practical Approaches for Getting Started" ...

Part 1 200-250 words with referencesprovide an example of a

Part 1: 200-250 words with references Provide an example of a data warehouse model defining the grain, dimensions and facts of the data warehouse. Part 2: 200-250 words with references Identify the importance of selectin ...

For this assignment research the internet or strayer

For this assignment, research the Internet or Strayer databases for information related to improper assumptions concerning accounting information systems. Write a five to seven (5-7) page paper in which you: Based on you ...

Discussion conflict with teamspart 1 conflict within

Discussion Conflict with Teams Part 1: Conflict within Teams Think of a conflict that occurred in a team you were a part of and analyze it. What were the main sources of the conflict? What interventions can be used to im ...

Respectfully please see the structure for the program im

Respectfully, Please see the structure for the program I'm trying to write using Python. Below is how the program should be structured. 1. Program general structure: Function definitions should be at the top of the progr ...

Discussion 1 1why would someone shop on the internet buy an

Discussion 1: 1. Why would someone shop on the Internet? Buy an iPod? Eat at TGI Friday's frequently? 2. a. Why would someone else not make those purchases? 3. b. How would you choose one outlet, brand, or model over the ...

Solutions for e-banking security holesdigital security of

Solutions for E-Banking Security Holes: Digital Security of software systems in Banks is very important to protect sensitive bank information, employee's identity and customer's privacy, also to avoid many legal problems ...

Individual projectusing proper apa format write 2 to 4

Individual Project Using proper APA format write 2 to 4 pages on the following • Search the Internet for an article where physical security failed • Propose and discuss possible changes in that organization's physical se ...

1 a major hurricane has struck the area where your company

1. A major hurricane has struck the area where your company has its central data center. There offsite backups and hardware at three other centers around the country. 2. Assume that the area is suffering greatly from the ...

Promptin our final assignment you will create an 8-10 slide

Prompt In our final assignment, you will create an 8-10 slide PowerPoint presentation examining the topic you selected at the procon.org website. Step One - Present and evaluate the premises and conclusions that support ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As