Ayush Gupta has Published 541 Articles

C++ program to find the sum of the series 1 + 1/2^2 + 1/3^3 + …..+ 1/n^n

Ayush Gupta

Ayush Gupta

Updated on 09-Jul-2020 08:51:51

638 Views

In this tutorial, we will be discussing a program to find the sum of the given series 1 + 1/2^2 + 1/3^3 + …..+ 1/n^n.For this, we will be given with the value of n and our task is to add up every term starting from the first one to ... Read More

Maximum size rectangle binary sub-matrix with all 1s in C++

Ayush Gupta

Ayush Gupta

Updated on 03-Jul-2020 08:06:57

128 Views

In this tutorial, we will be discussing a program to find maximum size rectangle binary sub-matrix with all 1s.For this we will be provided with 2D matrix containing zeroes and ones. Our task is to find the largest 2D matrix subset containing only ones.Example Live Demo#include using namespace std; #define ... Read More

Maximum size of sub-array that satisfies the given condition in C++

Ayush Gupta

Ayush Gupta

Updated on 03-Jul-2020 08:02:35

108 Views

In this tutorial, we will be discussing a program to find maximum size of sub-array that satisfies the given condition.For this we will be provided with an array of integers. Our task is to find the maximum length subset of that array satisfying either of arr[k] > arr[k + 1] ... Read More

Maximum product subset of an array in C++

Ayush Gupta

Ayush Gupta

Updated on 03-Jul-2020 07:53:26

149 Views

In this tutorial, we will be discussing a program to find maximum product subset of an array.For this we will be provided with an array containing positive and negative values. Our task is to find the maximum product for a subset of the array.Example Live Demo#include using namespace std; int ... Read More

Program to find the kth character after decrypting a string in C++

Ayush Gupta

Ayush Gupta

Updated on 08-Jun-2020 10:37:35

146 Views

In this tutorial, we will be discussing a program to find the kth character after decrypting a string.For this, we will be provided with a string that will consist of characters and numbers and integer K. Our task is to decrypt the given string and find the character at Kth ... Read More

Program to find the Area of an Ellipse in C++

Ayush Gupta

Ayush Gupta

Updated on 02-Jun-2020 11:24:20

167 Views

In this tutorial, we will be discussing a program to find the area of an Ellipse.For this, we will be provided with the semi-major axis and semi-minor axis of the Ellipse. Our task is to calculate and print out the area of the given Ellipse.Example Live Demo#include using namespace std; //finding ... Read More

Program to find sum of first n natural numbers in C++

Ayush Gupta

Ayush Gupta

Updated on 27-May-2020 09:39:58

322 Views

In this tutorial, we will be discussing a program to find sum of first n natural numbers.For this we will be provided with an integer n. Our task is to add up, find the sum of the first n natural numbers and print it out.Example Live Demo#include using namespace std; //returning ... Read More

Program to find root of an equations using secant method in C++

Ayush Gupta

Ayush Gupta

Updated on 19-May-2020 11:51:15

783 Views

In this tutorial, we will be discussing a program to find the root of an equation using secant method.For this we will be provided with an equation. Our task is to find the roots of that equation using the iterative secant method.Example Live Demo#include using namespace std; float f(float x) ... Read More

Program to find Prime Numbers Between given Interval in C++

Ayush Gupta

Ayush Gupta

Updated on 19-May-2020 11:43:27

197 Views

In this tutorial, we will be discussing a program to find prime numbers between given intervals.For this we would be provided with two integers. Our task is to find the prime numbers in that particular range.Example Live Demo#include using namespace std; int main() {    int a, b, i, j, ... Read More

Program to find parity in C++

Ayush Gupta

Ayush Gupta

Updated on 19-May-2020 11:38:59

320 Views

In this tutorial, we will be discussing a program to find parity.For this we will be provided with a number. Our task is to find its parity i.e count of whether the number of ones are odd or even.Example Live Demo# include # define bool int using namespace std; //finding the ... Read More

Advertisements