Write a program which validates that the entry is a integer

Assignment Help Programming Languages
Reference no: EM131321564

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.

Reference no: EM131321564

Questions Cloud

What would be the reading on the scale : Your mass is 50 kg. Suppose you are standing on a scale in an elevator that starts moving up and increases its speed at the rate of 3 m/s every second. What would be the reading on the scale?
Describe the annual percentage rate : Describe the relationship between annual percentage rate (APR) and effective annual rate (EAR) (not the differences, but rather the relation(s) or connection(s) between the two). If supplying an equation(s), please be sure to explain in words the rel..
Read the article and write essay about concepts learned : Read the article And write 3 pages essay about concepts learned and recommendations.- Given the topic is:- "The Dynamic Efectos of aggregate demand and supply disturbances.".
Internal controls under the pcaob standards : What is the difference between a significant deficiency and a material weakness as it relates to internal Control - How does the presence of one material deficiency affect the auditor's report on internal controls under the PCAOB standards?
Write a program which validates that the entry is a integer : Write a program which: Asks the user to enter a positive integer greater than or equal to 0, Validates that the entry is a positive integer and Outputs the digits in reverse order with a space separating the digits.
Where to issue dividends with the excess cash : Sally Corp. is an all-equity firm with 2000000 shares outstanding. Partition Corp has $22000000 in cash and expects future free cash flows of $120000000 per year. The cost of capital of Partition Corp. s investments is 8%. What would be the price of ..
What is the role of nursing in the development : What are the known incentives for implementation of an electronic health record? What is the role of nursing in the development of these records? What is the role of a nurse who specializes in nursing informatics
Identify the balance-related audit : For each misstatement, identify the balance-related audit objective to which it pertains - For each misstatement, list an internal control that should prevent it.
Discuss what caused the decline in the use of s-http : Study both SSL and S-HTTP. Show that these two protocols have a lot in common. However, the two protocols have some differences. Discuss these differences. Discuss what caused the decline in the use of S-HTTP.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write program which demands user to enter ten numbers

Write the program which demands user to enter 10 numbers (using an input box) and prints (using a message box) message ‘negative' if number is less than zero.

  Write subclass for constructor accepting a double

Write a (non-abstract) subclass, ApartmentHouse, containing: a constructor accepting a double, passed to the superclass constructor, and an int used to initialize numberOfApartments

  Write a recursive boolean function named ismember

Write a recursive Boolean function named isMember . The function should accept two arguments: an array and a value. The function should return true if the value is found in the array, or false if the value is not found in the array. Demonstrate t..

  Write program to calculate integer part of quotient

Write program segments that accomplish each of the following tasks:Calculate the integer part of the quotient when integer a is divided by integer. Calculate the integer remainder when integer a is divided by integer b.

  Write a program for a furniture company

Write a program for a furniture company that determines the price of a table. Ask the user to choose 1 for pine, 2 for oak, or 3 for mahogany. The output is the name of the wood chosen as well as the price of the table

  Falling letters game

Generic queue in the first project and generic list in the second project - In the second project, the player clicks the mouse on any falling letter to remove that letter from the window.

  Write a function to circulate a list

Write a function to circulate a list. The function takes two paramaters, the first defines how many elements of the list to circulate, and the second is the list. The output should be the circulated list.

  Write a program to clean up lane9.dat

Write a program to clean up lane9.dat. Write all numbers and spaces to cleanlane9.txt.

  Show tic-tac-toe game scenario diagram

The assignment is not to implement this game in Ruby. Rather, the assignment is to use scenario diagrams to discover the objects, their responsibilities, and the messages they respond to

  Program-dynamically check store-s inventory-central office

You are the outside consultant to large chain of grocery stores. Store's management would like to dynamically check store's inventory from central office.

  Taxpayer to contribute to a roth ira

Program- The IRS allows a taxpayer to contribute to a ROTH IRA, if his/her income is not over a specified limit and his/her filing status allows contributions

  Create a class called pizzaorder

Create a class called PizzaOrder that has the following members: toppingsOffered[] - a constant array of Strings representing the choice of low-price toppings, e.g., { "onions", "bell peppers", "olives", "pepperoni"... }. This member is public and..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd