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
Recommended Answers
Jump to Postyou 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:
Re-read your project assignment. Pay particular attention to the part that I bolded.
All 2 Replies
Reply to this topic
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.