# Category Archives: Number Programs

## Write a Java program to find roots of quadratic equation in all cases

Java program to find roots of quadratic equation Write a Java program to find roots of quadratic equation in all cases. This Java Program To Compute Roots of Quadratic Equation makes use of If – Else Block. What is a Quadratic Equation? It is a term used in Elementary Algebra. The Standard Form of a Quadratic… Read More »

## Write a Java program to multiply N numbers without using * operator

Java program to multiply N numbers without using * operator Write a Java program to multiply N numbers without using * multiplication operator.As we all know that there are lot of methods or techniques to solve problem to produce desired output. Basic idea of this java program to show varies methods of problem solving techniques, although we… Read More »

## Write a Java program to find Reverse of a number

Java program to find Reverse of a number Java Program to reverse a number in Java Programming, you have to ask to the user to enter the number. Start reversing the number, first make a variable rev and place 0 to rev initially, and make one more variable say rem. Now place the modulus of… Read More »

## Write a Java Program to Find GCD(HCF) and LCM of Two Numbers

Java Program to Find HCF and LCM of Two Numbers To find the HCF and LCM of two number in Java Programming, you have to ask to the user to enter the two number, to find the HCF and LCM of the given two number to display the value of the HCF and LCM of… Read More »

## Write a Java program to generate random numbers using Random()

Java program to generate random numbers To generate random numbers in Java programming, you have to create the object of Random class available in the java.util.Random package as shown in the following program. Following Java program to generate random numbers: This code generates random numbers in range 0 to 10000

## Write a Java Program to Print Pascal Triangle using For Loop

Write a Java Program to Print Pascal Triangle using For Loop To print pascal’s triangle in Java Programming, you have to use three for loops and start printing pascal’s triangle as shown in the following example. Following Java Program ask to the user to enter the number of line/row upto which the Pascal’s triangle will… Read More »

## Write a Java Program to print Armstrong numbers between desired Range

Java Program to print Armstrong numbers between desired Range Print Armstrong Numbers: To print Armstrong number in Java Programming, you have to ask to the user to enter the interval in which he/she want to find Armstrong numbers between desired range as shown in the below program. Let’s look at the following Java program.

## Write a Java Program to display n Prime Numbers using Exception Handling

Java Program to display Prime Numbers using Exception Handling Write a Java Program to display Prime Numbers using Exception Handling…. In this program , we input from the user to enter the last limit upto which he/she wants to display prime no.s. We used function to check for the prime number and exception Handling for… Read More »

## Write a Java Program to Find Sum of Digits of given Number

Write a Java Program to Find Sum of Digits of given Number   Sum of digits means add all the digits of entered number. For example: we take any number like 121. Its sum of all digits is 1+2+1=4.   SOURCE CODE ::

## Write a Java Program to find given number is Palindrome or Not

Write a Java Program to find given number is Palindrome or Not A Palindrome number is a number that remains the same when its digits are reversed. Like 12321, for example: we take 121 and reverse it, after revers it is same as original number.   SOURCE CODE ::