Mr. Satyabrata

Mr. Satyabrata

318 Articles Published

Articles by Mr. Satyabrata

Page 31 of 32

Java Program to Enter a Number in Digit and Display in Words

Mr. Satyabrata
Mr. Satyabrata
Updated on 27-Dec-2022 3K+ Views

Digits are basically represented in number format or these are integer values. But for pronouncing them we are using words. Every digit has a unique word format. For example, the word format of 1 is “One”. Like that for 2 the word format is “two”, for 3 the word format is “three” ... etc. For two-digit number the number format is little different. 21 represents as “twenty-one”, 45 represents as “forty-five” .... etc. So for all type of number there has a unique word format available. To show you some instances  Instance-1 Input number is 15. Word format of 15 ...

Read More

Java Menu Driven Program to Perform Array Operation

Mr. Satyabrata
Mr. Satyabrata
Updated on 27-Dec-2022 3K+ Views

Array in Java is called as a non primitive data type which stores a fixed number of single type values. It is called a One-dimensional array. In this article, we will see how to perform different array operations like checking duplicate elements, printing array in reverse order, checking largest element, checking smallest element, finding sum of all array elements by using Java Menu driven program. We will be implementing the application using a switch case. To show you some instances − Instance-1 Suppose we have created an array containing 6 elements and array elements are [2, 4, 6, 2, 6, ...

Read More

Java Menu Driven Program to Determine Cost of New Membership

Mr. Satyabrata
Mr. Satyabrata
Updated on 27-Dec-2022 399 Views

When we go anywhere for any type of membership they have different prices for different plans. For example silver membership, gold membership, diamond membership, platinum membership etc. where the silver membership costs less than others and platinum membership costs more than other plans. In this article we will see how to check the cost of a membership by using the Java programming language. We will be implementing the application using a switch case. To show you some instances  Instance-1 Suppose we have Rs 1840 as base membership price and you want to have a silver membership. The cost of silver ...

Read More

Java Menu Driven Program to Check Type of a Number

Mr. Satyabrata
Mr. Satyabrata
Updated on 27-Dec-2022 573 Views

In Java we have primitive numeric data types for numbers that are short, byte, int, long, float and double. These numeric data types allow us to represent different integer and real numbers based on their range as a specific data type has its lower and upper range. Below are the 6 primitive numeric data types  byte: Range -128 to 127 (Size 1 byte) short: Range -32, 768 to 32, 767 (Size 2 bytes) int: Range -2, 147, 483, 648 to 2, 147, 483, 647 (Size 4 bytes) long: Range -9, 223, 372, 036, 854, 775, 808 to 9, 223, 372, ...

Read More

Find the Area of a Circle Inscribed in a Square in Java

Mr. Satyabrata
Mr. Satyabrata
Updated on 27-Dec-2022 714 Views

A circle is a round shape two-dimensional diagram which has no corners. Every circle has an origin point and every point on the circle maintains equal distance from the origin. The distance between the origin and a point in a circle is known as Radius of the circle. And similarly, if we draw a line from one edge to another edge of the circle and the origin is held in the middle of it, that line is known as diameter of the circle. Basically, the diameter is double of the length of the radius. A square consists of four sides ...

Read More

JAVA Program To Convert Roman Number to Integer Number

Mr. Satyabrata
Mr. Satyabrata
Updated on 27-Dec-2022 10K+ Views

Roman Number − Based on the ancient Roman system, symbols are used to represent the numbers. These numbers are known as Roman numbers. Symbols are I, V, X, L, C, D, and M use respectively for 1, 5, 10, 50, 100, 500, and 1, 000. Integer Number − Integer number is nothing but the whole number which consists ofpositive, negative and zero value. Fraction numbers are not integers. Here we have set the symbol values as per their integer values. Whenever a roman number is entered as input we divide into units and then calculate the appropriate roman number. I ...

Read More

Check Whether a Number is an Autobiographical Number or Not in JAVA

Mr. Satyabrata
Mr. Satyabrata
Updated on 27-Dec-2022 9K+ Views

A number is said to be an Autobiographical number, if the number’s first digit represents the number of 0 available in the given number, the second number represents the number of 1 present in the given number, the third number represents the number of 2 present in the given number and so on. In simple terms, if the given number’s digits from left to right represent the frequency of 0, 1, 2, 3, 4.... N respectively present in the given number then that number is known as Autobiographical number. Some examples of Autobiographical numbers are: 1210, 2020, 21200, 3211000, 42101000 ...

Read More

Check Whether a Number is a Coprime Number or Not in Java

Mr. Satyabrata
Mr. Satyabrata
Updated on 27-Dec-2022 7K+ Views

Two numbers are said to be Coprime numbers, if the maximum common divisors is 1 for those two numbers. For more clarification, there might be multiple divisors for any number and in some scenarios, there are some common divisors that are also present between two number’s divisors. So, if in any case we get the maximum common divisors between two numbers are 1, then those two numbers are known as coprime numbers. Simply, it means those numbers do not have any other common factors other than 1. In other words, we can say that these two numbers are mutually prime ...

Read More

JAVA Program to Calculate Shortest Distance from Center of the Circle to Chord

Mr. Satyabrata
Mr. Satyabrata
Updated on 27-Dec-2022 466 Views

A circle is a round shape two-dimensional diagram which has no corners. Every circle has an origin point and every point on the circle maintains equal distance from the origin. The distance between the origin and a point in a circle is known as Radius of the circle. And similarly, if we draw a line from one edge to another edge of the circle and the origin is held in the middle of it, that line is known as diameter of the circle. Basically, the diameter is double of the length of the radius. Chord of the circle refers to ...

Read More

JAVA Program to Calculate Length of Chord of the Circle

Mr. Satyabrata
Mr. Satyabrata
Updated on 27-Dec-2022 440 Views

A circle is a round shape two-dimensional diagram which has no corners. Every circle has an origin point and every point on the circle maintains equal distance from the origin. The distance between the origin and a point in a circle is known as Radius of the circle. And similarly, if we draw a line from one edge to another edge of the circle and the origin is held in the middle of it, that line is known as diameter of the circle. Basically, the diameter is double of the length of the radius. Chord of the circle refers to ...

Read More
Showing 301–310 of 318 articles
Advertisements