How to divide two numbers without using division (/) operator in java / How to find remainder of division of two numbers using minus (-) operator / Java program to find remainder of division using –

Suppose you want to divide a number a by another number b in java, you will use a / b. So simple, isn’t it. But what if you are required to determine the result by using only minus(-) operator, that is, without using division (/) operator. (more…)

Continue Reading

How to convert binary number to decimal in java


A binary number is a number which is composed of digits 1 and 0 such as 110011. A decimal number is a number which is composed of digits 0 to 9 such as 130672. It is a common requirement in computer programming to convert a binary number to decimal format and vice-versa. In this post, we will focus on different ways a binary number can be converted to a decimal number in java. (more…)

Continue Reading

Java Program to check a Fascinating number / How to check if a number is Fascinating

What is Fascinating number

If a number of at least three digits is concatenated with its products by 2 and 3 and the result contains all the digits from 1 to 9 and these digits are present exactly once, then the number is said to be Fascinating. It should be noted that there is NO restriction on the number of zeroes in the resultant number. Any number of zeroes may be present.

Example, Suppose the number is 192. Now, (more…)

Continue Reading
Close Menu