Posts

Showing posts from May, 2018

PalPrime Number in JAVA

Image
Palindromic Prime Number in JAVA If a number is simultaneously palindromic and prime then it is said to be a  PalPrime  Number. Example: Number 313, 353 etc are PalPrime  number. Algorithm and Program below :-

Magic Number in JAVA

Magic Number in JAVA A Number is said to be a Magic Number if the sum of its digits are calculated till a single digit is obtained by recursively adding the sum of its digits. If the single digit comes to be 1  then the number is a Magic Number . Example- 199 is a magic number as 1+9+9=19 but 19 is not a sigle digit number so 1+9=10 and then 1+0=1 which is a single digit number and also 1.Hence it is a magic number. PROGRAM below :-

Composite Number in JAVA

Image
Composite Number in JAVA A  Composite Number   is a positive integer that has at least one positive divisor other than one or the  number  itself. Example : 4,6,8 etc are composite number. Algorithm and Program below :-

Neon Number in JAVA

Neon Number in JAVA A Neon Number is a number whose sum of digits of square of the number is equal to the number. Example : Input number is  9 , its square is  9 * 9  =  81  and sum of the digits of square is  9 . i.e.  9  is a neon number Algorithm and Program below :-

SPY Number in JAVA

SPY Number in JAVA A Number is said to be a  SPY  Number if the sum and product of all digits are equal. Example: Number  123  is a Spy number, sum of its digits is  6 Algorithm and Program below :-

Perfect Number in JAVA

Image
Perfect Number in JAVA A  Perfect Number  is a positive integer that is equal to the sum of factors i.e. the sum of its positive factors excluding the  number  itself. Example - Factors of 6 = 1+2+3 = 6 . 6 is a Perfect Number Algorithm and Program below :-

Niven/Harshad Number in JAVA

Niven/Harshad Number in JAVA A positive integer which is divisible by the sum of its digits, also called a  Niven/Harshad number. Example - 81 is divisible by 8+1= 9 . 81 is Niven Number. Algorithm and Program below :-

Pattern Program - 2 in JAVA

Pattern Program - 2 Program to display the following number pattern on screen. Pattern :- 12345 1234 123 12 1 12 123 1234 12345 Algorithm :-

Pattern Program in JAVA

Pattern Program - 1 Program to display the following number pattern on screen. Pattern :- 1 12 123 1234 12345 Program below :-

Program to check a Number is Even or Odd.

Program to check a Number is Even or Odd A number is even if it is divided by 2 leaves no remainder, Otherwise it is an odd number. Example : 16 when divide by 2 leaves no remainder So 16 is even.                  19 when divide by 2 leaves 1 remainder so 19 is odd. Algorithm :-

Quiz Game Program in JAVA for ICSE

Quiz Game Program in JAVA Quiz Program Project in JAVA for ICSE Students :- User is asked to give answers of 40 questions. For every correct answer 1 point is added in the score. At the end Final Score will be displayed. Run program in Bluej for organised and better result. Program below :-

Palindrome Number in JAVA

Palindrome Number in JAVA Program to check a number is Palindrome or not. A Palindrome Number  is a number that remains the same when its digits are reversed. Example : 121 is a palindrome number. Program and Algorithm below :-

Reverse of a Number

Reverse of a Number Program to display reverse of a number Example  : Original Number : 423                  Reverse Number : 234 Program below :-

Factorial Number in JAVA

Program of Factorial Number Program to calculate factorial of a number. Factorial of a positive integer is the multiplication of  all positive integers greater than 0 and smaller than or equal to the number. Factorial of a number is denoted by (!) sign. Example : 5! = 5*4*3*2*1 = 120 Program below :-

Armstrong Number in JAVA

Armstrong Number Program to check a number is Armstrong or Not. A Number is said to be A rmstrong Number  if it is equal to the sum of cubes of its digits. Example : 0, 1, 153, 370, 371, 407 etc. Program below:-

Automorphic Number in JAVA

Automorphic Number Program to check a number is Automorphic or Not. A Number is said to be Automorphic if the last digit of its square is same as the Number. Example : Input: 25, Square= 625 Output : 25 is automorphic number. Program below:-