This is a java program for happy number but before that what is a happy number. A number whose sum of the square of digits is ultimatly equal to 1 is a happy number. By ultimately we mean that starting with any positive number we continue the addition of square of digits till we get a single digit number (0 ...

Read More »## Java program for reversing a number

This program reverses a number given as a input. This java program for reversing a number uses a concept of dividing the given number by 10 and adding the remainder to the units digit in new number everytime. You can add to a unit place everytime by multiplying a number by 10 first(which will leave unit digit as 0) and ...

Read More »## Java Program to check for a Kaprekar number

Here is given java program to check for a Kaprekar number. But before what exactly is a Kaprekar number and why it is called a kaprekar number? A Kaprekar number is a number whose square can be broken/partitioned in such a manner that the sum of the partitions adds up to bring the number itself. Example: 992 = 9801 : 98+01 ...

Read More »## Bluej/Java program for spiral matrix

This is a java program for spiral matrix. [crayon-588468403e70e938523190/] OUTPUT: Tags: Bluej program for spiral matrix, java program for spiral matrix.

Read More »## Java Program to check for a Magic Number

This is a Java program for Magic number. However before starting let me tell you what is a magic number. A Magic number is a number whose sum of digits eventually leads to 1. Example#1: 19 ; 1+9 =10 ; 1+0 = 1. Hence a magic number. Example#2: 226; 2+2+6=10; 1+0 =1. Hence a magic number. Example#3: 874; 8+7+4=19; 1+9=10; 1+0=1. ...

Read More »## Program for smith number in Java

This is a program in java to check whether a number is a or not. [crayon-588468403f678678949994/] OUTPUT: Tags: Program for smith number in java, java program for smith number.

Read More »## Java program to translate english to piglatin form

This is a program to convert a english word into piglatin form: Piglatin form: Any word is converted into piglatin form by starting the word from the first vowel and adding the remaining part in the end followed by “AY” [crayon-588468403faaa531746653/] OUTPUT: Another Java program to convert whole english sentence to piglatin form: [crayon-588468403fab5365131151/] OUTPUT: However, conversion of piglatin to english ...

Read More »## Program in Java to find whether a number is perfect or not

Perfect Number- If the sum of all the factors of a number is equal to the number itself then it is a perfect number. This program finds whether a given number is perfect number or not. Example:- 6 = 1+2+3 28 = 1+2+4+7+14

Read More »