How to check Pronic number in java / Program to check for Pronic number in java

What is a Pronic Number ?

A number which is the product of two consecutive numbers is a Pronic Number. Consecutive means the numbers which come one after other when counted in ascending order such as 2,3; 5,6; 98,99 and so on. Thus, a product of any two consecutive numbers is a Pronic number. Example, 12 is a product of 3 and 4 (consecutive numbers), thus it is a Pronic number. Other examples of Pronic numbers are 20 (product of 4 and 5), 42 (product of 6 and 7), 72 (product of 8 and 9) and so on.

(more…)

Continue Reading

How to convert decimal number to binary in java / Various ways to convert decimal number to binary in java

Overview

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 decimal number can be converted to its equivalent binary number in java.

(more…)

Continue Reading

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

Overview

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
Close Menu