1. Engineering
  2. Computer Science
  3. program write a complete c program that input read...

Question: program write a complete c program that input read...

Question details

Program : Write a complete C++ program that Input: Read a positive integer from the keyboard (user) with proper prompt text and save it to a variable. The integer have up to five digits. Processing: From the right most digit, extract every digit from the input integer using modular operator %then save the digit to a separate variable. Remove the right most digit from the integer using integer division operator /. Repeat above two steps till all digits have been extracted. Output: Print out all digits of the integer in the right-to-left or the left-to-right order with proper prompts.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution