Write a program that uses a loop (or loops) to find the address where the Riddler plans to strike.
Holy digits Batman! The Riddler is planning his next caper somewhere on Pennsylvania Avenue. In his usual sporting fashion, he has left the address in the form of a puzzle. The address on Pennsylvania is a four digit number where:
• All four digits are different
• The digit in the thousands place is three times the digit in the tens place
• The number is odd
• The sum of the digits is 27
Loop over all the digits in the address. You can generate an integer that corresponds to the digits and check if it meets the constraints, or check if individual digits meet the constraints.
See the code in Riddler.java
You might also like to view...
You are working on a server that is experiencing issues with a device driver. Under which log should you look for more information regarding the issue?
A. System B. Application C. Security D. Forwarded Events
The Border button and the Shading button are located in the _____ group on the HOME tab.
A. Editing B. Illustrations C. Paragraph D. Preview