(Number Break & Reverse) in c++ using if else if
Write a program that asks for two positive numbers from the user. The first number is a single-digit positive integer, say len number of digits in the number, whereas the second number is a positive integer, say num, of len-digits. The number of digits, len, shall be greater than 5.
The program, then, calculates the reverse, rev of the number, num, such that the third and fifth digits of the number, num, are increased by 1 in the reversal process. Finally, the program displays the original and reversed numbers. (Note that it after an increase by 1 the number becomes 10, then it should be treated as zero. In other words, the addition is modulo 10.) For example, if the user enters 9 and 112294078, then the output shall be as follows
Original Number = 112294078 Reverse Number = 871402211
Answers
Answered by
1
Answer:
num" (and any subsequent words) was ignored because we limit queries to 32 words.
Similar questions
Social Sciences,
2 months ago
Math,
2 months ago
Math,
2 months ago
English,
4 months ago
Math,
10 months ago
Computer Science,
10 months ago