Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

Write a simple program


file If you take the number 2178, multiply it by four, and reverse the digits — you will get 2178 again. This is the only four-digit number that has this property (or so I am told). There is also a five-digit number that works! Write a program to find the five-digit number that is reversed when multiplied by 4. Your program should be structured in such a way that the main program calls upon a helper method that determines whether a particular 5-digit number satisfies the required property (and if so, prints a message to indicate success). Attachments
Tags Clarifications




Implemented as asked in the question. Attachments (1 K) Download Preview
number % 10; value += remainder; number = number / 10; } return Integer.parseInt(value); } public static void main(String[] args) { Scanner sc

Purchase Answer