# Category Archives: Loops

## Perfect Number in C

Here you will get program for perfect number in C. Perfect number is a positive number which is equal to the sum of all its divisors excluding itself. For example: 28 is a perfect number as 1 + 2 + 4 + 7 + 14 = 28. 15 is not perfect number as 1 +… Read More »

## Strong Number in C

Here you will get program for strong number in C. What is Strong Number? A number in which the sum of factorial of individual digits is equal to the number is called strong number. For example, 145 is a strong number because 145=(!1)+(!4)+(!5)=1+24+120=145 The below C program will check whether a given number in strong… Read More »

## C/C++ Program to Remove Spaces From String

For example given string is “the crazy programmer”. Now we have to remove all the spaces present in the string.   Before: the crazy programmer After: thecrazyprogrammer Below I have shared a program that perform above task with simple approach. You can ask your queries in the comment section. C/C++ Program to Remove Spaces From… Read More »

## C/C++ Program for Fibonacci Series Using Recursion

Series 0, 1, 1, 2, 3, 5, 8, 13, 21 . . . . . . . is a Fibonacci series. In Fibonacci series, each term is the sum of the two preceding terms.   The C and C++ program for Fibonacci series using recursion is given below.   C Program

C++ Program

Output:

## C++ Program to Check Whether a Number is Unique Number or Not

A unique number is a number in which no digit is repeated. For example: 102452 is not a unique number as 2 is repeated twice while 2374 is a unique number. So in this article I am sharing the C++ program that check if a number is unique or not.   Also Read: C++ Program to… Read More »

## C++ Program to Print Heart Shape with Happy Valentine’s Day Message inside it

Today’s day is very special for all lovers. So I thought that I should share some programming stuff that show Valentine’s Day feeling. A C++ program is given below which prints heart shape with a Happy Valentine’s Day message inside it. If you want, you can change the message by changing the value of string message. I hope that… Read More »

## Program for Fibonacci Series in Java

Here you will get program for fibonacci series in Java. It is a series in which next term is obtained by adding previous two terms. A fibonacci series will look like 0 1 1 2 3 5 8 13 21 34 . . . . Program for Fibonacci Series in Java

Output How many… Read More »

## 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 »

## Java Program to Display Multiplication Table of Any Number

Here you will get java program to find multiplication table of given number.

Output

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

Here you will get java program to find sum of digits of a number. For example if given digit is 125 then its sum will be 8.

Output