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

  How you may be able to pass variables in your program

Describe in detail how you may be able to pass variables in your program and elaborate with code-specific syntax as to the required keywords for each of the different ways to pass variables in your program

  Create algorithm and flowchart for amount to be doubled

Create the algorithm and the corresponding flowchart which print out after how many years will this amount be doubled.

  Write a method to computer the given series

Write a method to computer the following series: m(i) = 1/2 + 2/3 + . . . + i/i + 1. Write a test program that displays the following table: I m(i) 1 0.5000 2 1.1667 . . . 19 16.4023 20 17.3546.

  Write a recursive-descent parser

Use any programming language you prefer to write a recursive-descent parser that parses the language generated by the following EBNF descriptions

  Write program that takes input arithmetic expression

Write a program that takes as input an arithmetic expression. The program outputs whether the expression contains matching grouping symbols.

  Electro-magnetic force in newtons

The topic of this assignment was chosen so that you won't allow mathematical equations and scientific notation to intimidate you. No knowledge is required to complete the assignment beyond knowing how to perform mathematical operations within a fo..

  Create a macro that multiplies

Create a macro named mMult32 that multiplies two unsigned 32-bit memory operands and produces a 32-bit product.

  Describe your idea and analyze complexity of your solution

Describe your idea and analyze the complexity of your solution. Give O(N) algorithm to solve the problem. Analyze the complexity of your algorithm. Describe your approach and analyze the complexity of your algorithm.

  Create class named fraction which represent new data type

Math 3300 Programming Assignment. Create a class named fraction which will represent a new data type corresponding to fractions. Your class should create the following private members: Integers n and d corresponding to the numerator and denominator..

  Create program to read file calculate numbers of single men

Create a program to read through file and calculate numbers of married men, single men, married women and single women.

  Create the gui for object-s processing methods

Create pseudocode for each of the classes. Create the GUI which will make the objects and give access to each object's processing methods.

  Write a program that generates all the factors of a number

Write a program that generates all the factors of a number entered by the user. For instance, the number 12 has the factors 2 * 2 * 3.

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