Mr. Satyabrata has Published 387 Articles

How To Find the Midpoint of a Line in Java?

Mr. Satyabrata

Mr. Satyabrata

Updated on 28-Oct-2022 07:50:57

2K+ Views

Let's say (x1, y1) is the starting point of line and (x2, y2) is the end point of line. To get the midpoint of line we have to use the midpoint formula of line. Midpoint = ((x1+x2)/2 , (y1+y2)/2) In this article we will see how to find the ... Read More

How To Find Minimum Height of the Triangle with Given Base and Area in Java?

Mr. Satyabrata

Mr. Satyabrata

Updated on 28-Oct-2022 07:39:20

473 Views

We have the area of triangle ‘a’ and base ‘b’. As per problem statement we have to find the minimum height ‘h’ by using Java programming language. As we know area of triangle, when base and height are given − $$\mathrm{area \:=\: \frac{1}{2}\: * \:base\: *\: height}$$ By using ... Read More

How To Check Whether a Number is a Unique Number or Not in Java?

Mr. Satyabrata

Mr. Satyabrata

Updated on 28-Oct-2022 07:22:24

7K+ Views

Unique number can be defined as a number which does not have a single repeated digit in it. Simply it means all the digits of that number are unique digits, no duplicate digits are there in that number. In this article we will see how to check whether a number ... Read More

How to Check Whether a Number is a Triangular Number or Not in Java?

Mr. Satyabrata

Mr. Satyabrata

Updated on 28-Oct-2022 07:13:29

3K+ Views

Triangular number of a natural ‘n’ can be defined as the sum of all natural numbers from 1 to n. It is called as triangular as we can represent it in the form of an equilateral triangular grid by using the total number of points where the row number equals ... Read More

How To Check Whether a Number is a Sunny Number or Not in Java?

Mr. Satyabrata

Mr. Satyabrata

Updated on 28-Oct-2022 07:01:10

5K+ Views

A number is said to be a Sunny number, if the square root of the next value of input number is a perfect square of any number. For more clarification, if we add one to any number we get the next value. After that we have to find out the ... Read More

How To Check Whether a Number Is a Niven Number or Not in Java?

Mr. Satyabrata

Mr. Satyabrata

Updated on 27-Oct-2022 13:17:17

9K+ Views

Niven number can be defined as a number which is divisible by the sum of its digits. It is also called as Harshad number. In this article we will see how to check Niven numbers by using the Java programming language. To show you some instances Instance-1 Input number ... Read More

How to Check Whether a Number is Krishnamurthy Number or Not in Java?

Mr. Satyabrata

Mr. Satyabrata

Updated on 27-Oct-2022 13:11:42

6K+ Views

Krishnamurthy number can be defined as a number when the sum of the factorial of all digits is equal to the original number. This Krishnamurthy number is also called the Strong number, Special number and Peterson number. To show you some instances Instance-1 Input number is 1 Let’s check it ... Read More

How To Check Whether a Number is a Keith Number or Not in Java?

Mr. Satyabrata

Mr. Satyabrata

Updated on 27-Oct-2022 12:42:34

1K+ Views

A number is said to be a Keith number, if it is arranged with a special sequence of numbers which are initially created by its digits. After that the numbers of the sequence will be generated by adding its previous numbers till the number is exceeded from the input number. ... Read More

How To Check Whether a Number Is a Insolite Number or Not in Java?

Mr. Satyabrata

Mr. Satyabrata

Updated on 27-Oct-2022 12:35:07

238 Views

A number is said to be an Insolite number, if the number is divisible by both addition of squares of each digit and square of the whole product value of all digits. For more clarification, we have to find the addition of squares of each digit. Then we have to ... Read More

How To Check Whether a Number is a Harshad Number or Not in Java?

Mr. Satyabrata

Mr. Satyabrata

Updated on 27-Oct-2022 12:17:46

2K+ Views

Harshad number can be defined as a number which is divisible by the sum of its digits. Simply it means if the sum of the digits of the number is a factor of that number then it is a Harshad number. In this article we will see how to check ... Read More

Advertisements