Category Archives: Loops

Program to Reverse Number in Java

Here you will learn how to reverse number in java with a program example. For example given number is 1478 then its reverse will be 8741. Program to Reverse Number in Java   Output Enter any number: 4567 Reverse = 7654

Program for Factorial in Java

Here you will get program for factorial in java. We can find factorial of any number by multiplying it with all the numbers below it. For example, factorial of 4 is 4*3*2*1 = 24. Program for Factorial in Java   Output Enter a number: 6 Factorial = 720

Number Palindrome in Java

Here you will learn about number palindrome in java. A number is called palindrome if it is equal to its reverse. For example 1221 is a palindrome while 1234 is not palindrome. Below I have shared the java program to check given number is palindrome or not. Also Read: String Palindrome in Java   Program… Read More »

Program for Prime Number in Java

Here you will get program for prime number in java. A number is prime if it is divisible by 1 or itself. For example 2, 3, 5, etc are prime numbers while 4, 6, 8, etc are not prime. Program for Prime Number in Java   Output

Convert Binary to Decimal in C

Here you will get program to convert binary to decimal in C. We can obtain a decimal number by multiplying each digit of binary number with power of 2 and adding each multiplication result. The power starts from 0 and goes to n-1 where n is the total number of digits in binary number. Below… Read More »