A number which is only divisible by itself and 1 is known as prime number. For example 13 is a prime number because it is… [Read More]

## C++ Program to Check whether an input number is Prime or not

A number which is only divisible by itself and 1 is known as prime number, for example: 5 is a prime number because it is… [Read More]

## C++ Program to Check Leap Year using function

This program takes the value of year(entered by user) and checks whether the input year is Leap year or not. The steps to check leap… [Read More]

## C++ Program to Find the sum of n natural numbers using Recursion

The numbers 1, 2, 3,…, n are known as natural numbers. This program takes the value of n (entered by user) and prints the sum… [Read More]

## C++ Program to find the sum of n natural numbers

Numbers 1, 2, 3, …., n are known as natural numbers. This program takes the value of n and finds the sum of first n… [Read More]

## C++ Program to Display the Number Entered by User

This program takes the number entered by user using cin statement and prints it using cout statement Example: Program to display the number entered by… [Read More]

## C++ Program to find second Largest element in an array

This program finds the second largest element in an array. The program asks the user to enter the value of n, which is the number… [Read More]

## C++ Program to Find largest element in an array

This program finds the largest element in an array. User is asked to enter the value of n(number of elements in array) then program asks… [Read More]

## C++ Program to Find Second Smallest Element in an Array

In this program we ask the user to enter the size of array (number of elements). Then user would be asked to enter all the… [Read More]

## C++ Program to Find Smallest Element in an Array

You are given an integer array and you are asked to find the smallest (minimum) element of the array. This program asks the user to… [Read More]

## C++ Program to find the Missing Number

We are given a list of numbers in increasing order, but there is a missing number in the list. We will write a program to… [Read More]

## C++ Program to Find and display the Transpose of a Matrix

In this C++ tutorial, we will see how to find the transpose of a matrix, before going through the program, lets understand what is the… [Read More]

## C++ Program to Add two Matrices

In this tutorial, we will see three ways to add two Matrices in C++ – 1) Using a simple C++ program without using function 2)… [Read More]

## C++ Program to add two numbers

In this tutorial, we will see three ways to add two numbers in C++. 1) Simple C++ program to add two numbers 2) adding numbers… [Read More]