Write a program which asks the user to enter a positive


Write a program which:

1. Asks the user to enter a positive integer greater than or equal to 0

2. Validates that the entry is a positive integer

3. Outputs the digits in reverse order with a space separating the digits

4. Outputs the even digits not in reverse order with a space separating the digits (consider zero to be even)

5. Outputs the odd digits not in reverse order with a space separating the digits

6. Allows user is to repeat/continue the program as many times as he/she wants

7. Restrictions:

a. You may not use global variables

8. Requirements:

a. You MUST have a function called validateUserInput. This function ensures that the user input is valid and returns a string to main(). This function must take a string variable as a parameter.

b. You MUST have a function called reverse. This must be a void function and should output the digits in reverse order with a space separating them. This function must take a string variable as a parameter.

c. You MUST have a function called evenDigits. This must be a void function and should output the even digits not in reverse order with a space separating them. This function must take a string variable as a parameter.

d. You MUST have a function called oddDigits. This must be a void function and should output the odd digits not in reverse order with a space separating them. This function must take a string variable as a parameter.

Solution Preview :

Prepared by a verified Expert
Programming Languages: Write a program which asks the user to enter a positive
Reference No:- TGS01724217

Now Priced at $30 (50% Discount)

Recommended (95%)

Rated (4.7/5)