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

## C++ Program to Find Greatest Number Among Three Numbers

Below I have shared C++ program to find greatest number among three numbers. For example among three numbers 5, 13 and 7, the greatest number is 13. If you have any problem regarding above greatest number program then you can ask it by commenting below. C++ Program to Find Greatest Number Among Three Numbers   …

## C++ Program to Check Number is Odd or Even

Below I have shared the C++ program to check a number is odd or even. For example if user enters an odd number like 5 then the output will be Odd number and if user enters even number like 8 then output will be Even number. If you have any problem regarding below odd or …

## C++ Program to Convert Days Into Years, Weeks and Days

Below I have shared the C++ program to convert given number of days into years, weeks and days.   For example if user has entered 365 days (not a leap year) then the output will be:   Years: 1 Weeks: 0 Days: 0     If you have any problem regarding above years, weeks and …