Sudhir sharma has Published 1206 Articles

Sum of the series 1 + (1+2) + (1+2+3) + (1+2+3+4) + ... + (1+2+3+4+...+n) in C++

sudhir sharma

sudhir sharma

Updated on 14-Aug-2020 13:36:24

582 Views

In this problem, we are given a number n. Our task is to create a program to find the sum of the series 1 + (1+2) + (1+2+3) + (1+2+3+4) + … + (1+2+3+4+...+n).Lets example to understand the problem, Inputn = 4Output 20Explanation −(1) + (1+2) + (1+2+3) + (1+2+3+4) = ... Read More

Sum of the series 1 / 1 + (1 + 2) / (1 * 2) + (1 + 2 + 3) / (1 * 2 * 3) + … + upto n terms in C++

sudhir sharma

sudhir sharma

Updated on 14-Aug-2020 13:33:43

811 Views

Here, we are given an integer n. It defines the number of terms of the series 1/1 + ( (1+2)/(1*2) ) + ( (1+2+3)/(1*2*3) ) + … + upto n terms.Our task is to create a program that will find the sum of series 1/1 + (1+2)/(1*2) + (1+2+3)/(1*2*3) + ... Read More

Sum of the series 0.7, 0.77, 0.777 … upto n terms in C++

sudhir sharma

sudhir sharma

Updated on 14-Aug-2020 13:31:55

155 Views

In this problem, we are given n terms of a number. The series is 0.7, 0.77, 0.777…. Our task is to create a program to find the sim of the series 0.7, 0.77, 0.777 … upto n terms.Let’s take an example to understand the problem, Input  4Output  Explanation −0.7 + ... Read More

Sum of the products of all possible Subsets in C++

sudhir sharma

sudhir sharma

Updated on 14-Aug-2020 13:24:44

522 Views

In this problem, we are given an array arr[] of N numbers. Our task is to create a program that will find the sum of the products of all possible subsets.Here, we will find all subsets and then find the product of all elements for each subset. Then add all ... Read More

Sum of the nodes of a Circular Linked List in C++

sudhir sharma

sudhir sharma

Updated on 06-Aug-2020 08:29:34

218 Views

In this problem, we are given a circular linked list. Our task is to create a program to find the sum of the nodes of a Circular Linked List.We simply need to add all the node values of the linked list.Some important definitions Linked List is a sequence of data structures, ... Read More

Sum of the natural numbers (up to N) whose modulo with K yield R in C++

sudhir sharma

sudhir sharma

Updated on 06-Aug-2020 08:26:42

212 Views

In this problem, we are given three numbers N, K and R. Our task is to create a program to find the Sum of the natural numbers (up to N) whose modulo with K yield R.We will add all the numbers less than N that satisfy the following condition, i%K ... Read More

Sum of the multiples of two numbers below N in C++

sudhir sharma

sudhir sharma

Updated on 06-Aug-2020 08:25:22

262 Views

In this problem, we have given three integers M1, M2, and N. Our task is to create a program to find the sum of multiples of two numbers below N.Here, we will add all the elements below N which are multiples of either M1 or M2Let’s take an example to ... Read More

Sum of the mirror image nodes of a complete binary tree in an inorder way in C++

sudhir sharma

sudhir sharma

Updated on 06-Aug-2020 08:24:23

95 Views

In this problem, we are given a complete binary tree. Our task is to create a program to find the sum of the mirror image nodes of a complete binary tree in an inorder way.Here, we have to find the inorder traversal of the left sun-tree, and then for each ... Read More

Sum of the minimum elements in all connected components of an undirected graph in C++

sudhir sharma

sudhir sharma

Updated on 06-Aug-2020 08:17:40

322 Views

In this problem, we are given an array arr of N numbers where arr[i] represents (i+1)th node. Also, there are M pairs of edges where u and v represent the node connected by the edge. Our task is to create a program to find the sum of the minimum elements ... Read More

Sum of the first and last digit of a number in PL/SQL

sudhir sharma

sudhir sharma

Updated on 06-Aug-2020 08:15:02

806 Views

In this problem, we are given a number n. Our task is to create a program to find the sum of the first and last digit of a number in PL/SQL.First, let’s brush-up about PL/SQL, PL/SQL is a combination of SQL along with the procedural features of programming languages.Let’s take ... Read More

Advertisements