Design a program called cscd255_w13_hw2.c which reads in a non-negative integer
ID: 3528006 • Letter: D
Question
Design a program called cscd255_w13_hw2.c which reads in a non-negative integer (1 or greater) from the user. The user will then be prompted with a menu of choices (this menu should be repetitively displayed until the user chooses to quit): Your menu will include these choices 1. Enter a new number 2. Print the number of odd digits, even digits and zeros in the integer 3. Print the prime numbers between 2 and the integer 4. Print the number in reverse order 5. Quit the program PROGRAM PARTICULARS: When the program starts up, ask the user for a positive integer. After the user enters a positive integer, display the above menu. Remember the user can choose to do #2, #3, and #4 on the same number. Meaning, once you have the number from the user do not make the user enter a new number each time. The user can keep the same number until the user selects option 1. I have added a sample output of what the program should execute like. (See Below) There must be error checking on the input integer: if it is negative or 0, the program will print an error message and re-prompt. This process will continue until valid input is entered. You may assume an integer of some form will be entered by the user. There must be error checking on the menu choice entered: if the user enters a choice not on the menu, the program will print an error message, re-display the menu and re-prompt. This process will continue until valid input is entered. No string (char arrays) or any other kinds of array variables are allowed No built-in methods for integer manipulation are allowed. You may use pow( ) if you feel it is necessary. You may assume that no integer entered will be greater than the maximum integer size for type int. HINTS: First, solve the primary problems one at a time, testing each one separately. (Make sure that your algorithm works for single-digit numbers). Solve the input and error checking problems once the others are solved and tested.Explanation / Answer
Please rate
//that was a long project. Please rate and comment and I will unhost file
https://www.dropbox.com/s/t809f1ocdkqw2x4/cscd255_w13_hw2.txt
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.