C++

Programs

C++ program to check even odd number

In this article, you will learn a C++ program to check even odd number. Most people are familiar with even odd concepts from their childhood studies. Even numbers are those numbers that are divisible by 2 with 0 remainder. While odd numbers are not divisible by 2. Here you check some even and odd numbers. … Read more

Programs

C++ program to find largest element in an array

In this article, you will learn a C++ program to find the largest element in an array. The user will be asked to enter the total value “n” for array elements. For example, if the user enters 5. The program takes 5 array elements from the user and stores them in the following way. Example: … Read more

Programs

C++ program to check palindrome numbers

In this article, you will learn a C++ program to check palindrome numbers. The concept of palindrome numbers is very straightforward. The number becomes palindrome if it’s reverse as same as the original number. If we have a number 121. After reverse, it becomes 121. It is the same as the previous number so we … Read more

Programs

C++ program to check prime numbers

In this article, you will learn a C++ program to check prime numbers. The concept of prime numbers is very clear. All the positive integers that are divisible by 1 and themselves are called prime numbers. If we have a number 17. It’s a prime number because it is divisible by 1 and itself. While … Read more

Programs

C++ program to find the area of a square

In this article, you will learn a C++ program to find the area of a square. This program accepts the length of the square from the user. After computation, it displays an area of the square on the console screen. Formula Here is the formula to check the area of a square. Example: Find the … Read more

Programs

C++ program for temperature conversion

In this article, you will learn a C++ program for temperature conversion. The user can select and enter any of the temperatures from Celsius, Fahrenheit, or Kelvin and the program displays its corresponding temperatures on the console screen. Formula Here are the formulas for temperature conversion. Celsius to Fahrenheit ° F = 9/5 ( ° … Read more

Programs

C++ program to find the area of the circle

In this article, we will learn a C++ program to find the area of the circle. This program takes a radius from the user and shows the area of the circle on the console screen. Formula We can calculate the area of the circle by using the formula A = π r2 where π value … Read more

Programs

C++ program to find factorial

In this article, you will learn a C++ program to find the factorial of any number. This program takes a number as input from the user and displays its factorial on the console screen. Factorial can be calculated by multiplying the factorial value with its previous positive integers. You can check the formula below. Formula … Read more

Programs

C++ program to add two numbers using pointers

In this article, you will learn a C++ program to add two numbers using pointers. The pointers concept in C++ is very simple. They are the special type of variable in C++ that are used to store memory addresses of other variables. We can get the memory address of any variable by simply placing the … Read more

Programs

C++ program to add two numbers using a function

In this article, you will learn a C++ program to add two numbers using a function. The following function takes two numbers as an argument from the user and returns the sum. A function in C++ is a unique named block of code to perform a specific task. A good thing about the function is … Read more

Scroll to Top