Skip to content

Category Archives: C++ Programs

The imag() function is defined in the complex header file. The imag() function is used to find the imaginary part of the complex number. Syntax:… Read More
The real() function is defined in the complex header file. The real() function is used to find the real part of the complex number. Syntax:… Read More
Cycle:- cycle is a path of edges and vertices wherein a vertex is reachable from itself. or in other words, it is a Closed walk. … Read More
Given n, we need to find sum of first n terms of the series represented as Sn = 3 + 5 + 9 + 17… Read More
Given an array of N distinct elements, find the minimum number of swaps required to sort the array. Note: The problem is not asking to… Read More
Given a series:   Sn = 1*3 + 3*5 + 5*7 + …  It is required to find the sum of first n terms of this… Read More
Given the Length and Speed of the train and the time takes by the train to passes the bridge or tunnel, the task is to… Read More
Given N, the number of persons. The task is to arrange N person around a circular table.Examples:   Input: N = 4 Output: 6 Input: N… Read More
Problem Statement: Write a C++ program to create a file using file handling and check whether the file is created successfully or not. If a… Read More
The nearbyint() function is defined in cmath header file. This function round off the given value to a nearby integral value by using the current… Read More
Given two numbers and . The task is to find the sum of the sequence given below.  (1*2*3*…*k) + (2*3*…*k*(k+1)) + (3*4*..*(k+1)*(k+2)) +…..+((n-k+1)*(n-k+2)*…*(n-k+k)). Since the output can… Read More
Given two integers L and B denoting the length and breadth of a rectangle respectively. The task is to calculate the sum of the area… Read More
Given a number N. The task is to write a program to find the Nth term in the below series:   5, 13, 25, 41, 61...… Read More
Given a number N. The task is to write a program to find the Nth term in the below series:   1, 1, 2, 6, 24…… Read More
Given a number N. The task is to write a program to find the Nth term in the below series:   1, 8, 54, 384... Examples:  … Read More

Start Your Coding Journey Now!