## C++ Program to Find Sum of Square of n Natural Numbers

This C++ program will find the sum of square of n natural numbers. For example: n = 3 Then, Sum = 14   Output Enter any number: 50 Sum=42925

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

Here you will get C++ program to check a number is palindrome or not. A number is palindrome if it is equal to its reverse. For example 121 is palindrome because if we reverse the order of digits then the number so obtained is equal to original number.   Output Enter a number: 12321 Number …

## C++ Program to Find Divisors of a Number

Below is the C++ program to find all the divisors of a number.   A divisor is a number that divides another number completely. For example D is the divisor of N if N%D=0. Output Enter the number: 6 Divisors of 6 are 1 2 3 6

## C++ Program to Find Sum of Digits of a Number

Below I have shared C++ program to find sum of digits of a number. For example given number is 238 then sum of digits will be 13. I am using very simple logic. If we find mod of any number by 10 then the result is the last digit of the number. For example 123%10 …

## C++ Program to Find Sum of First n Natural Numbers

Here I have given C++ program to find sum of first n natural numbers. First of all I am reading value of n and then calculating the sum using for loop. If you have any doubts related to the program then feel free to ask in comment section. C++ Program to Find Sum of First …

## C++ Program to Check Given Character is Uppercase, Lowercase, Digit or Special Character

Below I have shared C++ program to check whether a given character is an uppercase or lowercase alphabet, a digit or a special character. First of all I read a character an then compare it with ASCII values given below. Uppercase Alphabet: 65-90 Lowercase Alphabet: 97-122 Digit: 48-57 If ASCII value of character is other …

## Program for Square Root in C++

Square root in C++ can be calculated using sqrt() function defined in math.h header file. This function takes a number as an argument and returns the square root of that number. Below I have shared a program to find square root in C++. If you have any problem then you can freely ask it by …

## Factorial Program in C++

Below I have shared the factorial program in C++.   Factorial is the product of a number and all the numbers below it. For example factorial of 4 is equal to 24.   If you have any problem regarding below factorial program in C++ then you can freely ask it by commenting below. Factorial Program …