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 a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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