Ask the user to enter a positive integer greater

Assignment Help Computer Engineering
Reference no: EM132207566

Write a program which:

1. Asks the user to enter a positive integer greater than 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. If there are no even digits, the an appropriate message should be displayed: There are no even digits

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

7. If there are no odd digits, the an appropriate message should be displayed: There are no odd digits

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

9. Keeps a record in a txt file named outDataFile.txt with the history of all numbers entered and the associated results, in the following format:

the original number is 1234
the number reversed 4 3 2 1
the even digits are 2 4
the odd digits are 1 3
-----------------
the original number is 135
the number reversed 5 3 1
There are no even digits
the odd digits are 1 3 5
-----------------
the original number is 862
the number reversed 2 6 8
the even digits are 8 6 2
There are no odd digits
-----------------

GENERAL RESTRICTIONS

No global variables

No infinite loops, examples include:

for(;;;)

while(1)

while(true)

do{//code}while(1);

No break statements to exit loops

Reference no: EM132207566

Questions Cloud

Facebook competitive environment of sellers of complements : Are Amazon, Apple, and Google competitors in Facebook’s competitive environment of sellers of complements? Explain.
Calculate profit at the present level of output : A firm in a perfectly competitive market, in the short run, faces a price of £20 per unit of its output. It employs 40 workers and produces 200 units per week.
Write the value 55h to ram locations 40h-4fh : Add all these RAM locations' contents together and save the result in RAM locations 60H and 61H.
Harley-davidson has its engine assembly plant in milwaukee : Harley-Davidson has its engine assembly plant in Milwaukee and its motorcycle assembly plant in Pennsylvania.
Ask the user to enter a positive integer greater : If there are no odd digits, the an appropriate message should be displayed: There are no odd digits.
Indifferent between current mode of operation and new option : what point will the company be indifferent between the current mode of operation and the new option?
Define the exchange rate and current account balance : Usually, the exchange rate and current account balance are inversely related. When exchange rate rises, the current account balance decreases.
Describe the most intractable organizational opportunity : Describe the most intractable organizational opportunity or most engaging organizational challenge that you have ever encountered as an employee.
Back pain using their proprietary myofascial therapy : A specialty pain clinic treats patients with severe chronic back pain using their proprietary Myofascial Therapy

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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