Skip to content

Category Archives: C++ Programs

Given two arrays arr1[] and arr2[] of length N and M respectively, the task is to check if the two arrays are equal or not. … Read More
Here, we will see how to multiply two floating-point numbers using the C++ program. Below are the examples: Examples: Input: A =1.2        … Read More
Given the value of R(number of rows), write a C++ program to print the Inverted Hollow Pyramid using stars and white spaces. Examples: Input: R… Read More
Given an integer array of size N, the task is to traverse and print the elements in the array. Examples: Input: arr[] = {2, -1,… Read More
To copy the text/contents of one file to another file, we should know the basics of reading and writing a text file in C++. To… Read More
Here, we will see a C++ program to print the 3 different number patterns. There are 3 number patterns covered using for loop and while… Read More
What is a leap yaer? A year consisting 366 days is a leap year.  How to identify a year is leap or not: A year… Read More
Given a number N, the task is to print the prime numbers from 1 to N. Examples:  Input: N = 10 Output: 2, 3, 5,… Read More
In C++ a 3-dimensional array can be implemented in two ways: Using array (static) Using vector (dynamic) Passing a static 3D array in a function:… Read More
Given a string of operations containing three operands for each operation “type of command“, “first operand“, and “second operand“. Calculate all the commands given in… Read More
LCM (Least Common Multiple) of two numbers is the smallest number which can be divided by both numbers. For example, LCM of 15 and 20… Read More
Given a number, check whether it is even or odd. Examples:  Input: 2 Output: even Input: 5 Output: odd Recommended Practice – Odd Even Problem… Read More
Given a Temperature n in Fahrenheit scale convert it into Celsius scale. Examples: Input: 32 Output: 0 Input: -40 Output: -40 Recommended: Please try your… Read More
Given two complex numbers of the form and the task is to add these two complex numbers. and  Here the values of real and imaginary… Read More
Given a character, we need to print its ASCII value in C++. Examples : Input: a Output: 97 Input: D Output: 68 C++ code: Here… Read More

Start Your Coding Journey Now!