Vampire Numbers 1

Description: The following programs finds out all the 4 digit Vampire numbers defined as follows:

What are Vampire numbers?

A vampire number has an even number of digits and is formed by multiplying a pair of numbers containing half the number of digits of the result. The digits are taken from the original number in any order. Pairs of trailing zeroes are not allowed.

Example include:
1260 = 21 * 60
1827 = 21 * 87
2187 = 27 * 81

Primary Inputs:    None
Primary Output:    all the 4 digit Vampire numbers.
Platform Used:      JDK 1.5 with Dr. Java.

Java

4/5 - (5 votes)

One comment on “Vampire Numbers

  1. Reply Sam Biba Oct 1,2019 4:12 pm

Leave a Reply