Answer :
The solution involves writing a Python program to prompt the user for a four-digit integer, convert this input to a string, reverse the string using Python slicing, and then print each number on a new line.
Here's a simple C++ program that prompts the user to enter a four-digit integer and then displays the number in reverse order:
```cpp
#include
int main() {
int number;
std::cout << "Enter a four-digit integer: ";
std::cin >> number;
if (number >= 1000 && number <= 9999) {
int digit1 = number % 10;
int digit2 = (number / 10) % 10;
int digit3 = (number / 100) % 10;
int digit4 = number / 1000;
std::cout << "Output: " << digit4 << digit3 << digit2 << digit1 << std::endl;
} else {
std::cout << "Invalid input. Please enter a four-digit integer." << std::endl;
}
return 0;
}
```
Copy and paste this code into a `.cpp` file (e.g., `reverse_digits.cpp`) and then compile and run it.
The program will prompt the user to enter a four-digit integer and then display the number in reverse order, as shown in the sample run you provided.
To know more about Python visit:
https://brainly.com/question/33633469
#SPJ11