if and if-else statement:
you will have to write a program that reads a 4-digit positive integer from the user and prints out the following information on the screen:
1. Whether the positive integer is an odd or even number
2. (display) The odd digits of the integer
3. (display) The even digits of the integer
4. Whether the number reads the same forwards and backwards (e.g., 4004, 4444, etc.)
5. Whether all four digits are the same (e.g., 8888)
ki72 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.