Sunday , December 11 2016
Home / JAVA / ICSE Class 10 / Program for Fascinating Number in JAVA

Program for Fascinating Number in JAVA

Fascinating Number :- The number of 3 digit or more, when we multiplied that number by 2 and 3, and product of both is concatenated with the original number, after concatenated the number contain all the digits from 1 to 9 exactly once, regardless of the number of zeros.

Example:

Consider a number 327
327*1=327
327*2=654
327*3=981

Concatenating all result: ‘327654981’

In this, it contains all the digits from 1 to 9 only once, so this is the fascinating number.

OUTPUT:

Enter a number : 192
192 is a Fascinating Number.

Enter a number : 652
652 is not a Fascinating Number.

Enter a number : 76
Number should be of atleast 3 digits.

Also See:   Java Program to find Mobius Function of number

Check Also

Program for Matrix Multiplication in JAVA

Matrix Multiplication:– Here is given a Java Program for Matrix Multiplication also call matrix product. In ...

Leave a Reply

Your email address will not be published. Required fields are marked *

Preventing spam * Time limit is exhausted. Please reload the CAPTCHA.