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

Computer Science & Information Technology

You might also like to view...

A(n) ____________________ is a named grouping of program code.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Excel ________ must be installed before they can be used

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

A(n) ____________________ signature is an encryption code that a person, website, or organization attaches to an electronic message to verify the identity of the message sender.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

________ rights may be used to prevent others from using a confusingly similar mark, but not to prevent others from making the same goods or from selling the same goods or services under a clearly different mark.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology