Sudhir sharma has Published 1206 Articles

C Programming for sum of the series 0.6, 0.06, 0.006, 0.0006, …to n terms

sudhir sharma

sudhir sharma

Updated on 09-Aug-2019 11:41:53

170 Views

The given series 0.6, 0 .o6, .... is a geometric progression where each element is the previous element divided by 10. So find the sum of the series we have to apply the sum of GP one formula for r less than 1(r=0.1 in our case).Sum = 6/10 [1- (1/10)n/(1-1/10)] ... Read More

C Programming for Sum of sequence 2, 22, 222, ………

sudhir sharma

sudhir sharma

Updated on 09-Aug-2019 11:40:23

1K+ Views

Given is a sequence: 2, 22, 222, 2222….. and we need to find the sum of this sequence. So we have to Go for the mathematical formula that is made to find the sum of the series, The explanation of the formula goes in such a way that -sum =[2+22+222+2222….] ... Read More

Sum of the numbers up to N that are divisible by 2 or 5 in c programming

sudhir sharma

sudhir sharma

Updated on 09-Aug-2019 11:37:58

259 Views

Sum of n natural numbers that are divisible by 2 or 5 can be found by finding the sum of all natural numbers up to N that is divisible by 2 and sum of all natural numbers up to N that is divisible by 5. Adding these two sums and ... Read More

Sum of the nodes of a Singly Linked List in C Program

sudhir sharma

sudhir sharma

Updated on 09-Aug-2019 11:34:13

4K+ Views

A singly linked list is a data structure in which an element has two parts one is the value and other is the link to the next element. So to find the sum of all elements of the singly linked list, we have to navigate to each node of the ... Read More

Sum of the first N terms of the series 5,12, 23, 38…. in C Programming

sudhir sharma

sudhir sharma

Updated on 09-Aug-2019 11:30:37

91 Views

To find the sum of the given series, we will analyze the series and try to get some traits that show it is known series or at least is a combination of 2 - 3 series. the given series is 5, 12, 23, 38…We have to find the sum of ... Read More

Sum of the first N terms of the series 2,10, 30, 68,…. in C programming

sudhir sharma

sudhir sharma

Updated on 09-Aug-2019 11:28:04

127 Views

To find the sum of this series, we will first analyze this series.The series is:The given series is 2, 10, 30, 68…For exampleFor n = 6 Sum = 464On analysis of the given series, you will see that the series is the addition of two series first one is the ... Read More

Sum of the first N terms of the series 2, 6, 12, 20, 30…. in c programming

sudhir sharma

sudhir sharma

Updated on 09-Aug-2019 11:21:01

254 Views

To find the sum of this series, we will first analyze this series.The series is: 2, 6, 12, 20, 30…ExampleFor n = 6 Sum = 112 On analysis, (1+1), (2+4), (3+9), (4+16)... (1+12), (2+22), (3+32), (4+42), can be divided into two series i.e. s1:1, 2, 3, 4, 5… andS2: 12, ... Read More

C++ Programming Internals?

sudhir sharma

sudhir sharma

Updated on 09-Aug-2019 07:28:43

373 Views

C++ Internals means how the working of C++ compiler compiling the .cpp code and giving us the output. C++ is a popular programming language mostly used for writing system software. It is an extension of the C programming language. C is a compiled language. The C++ compiler compiles C++ code ... Read More

C++ mutable keyword?

sudhir sharma

sudhir sharma

Updated on 09-Aug-2019 07:24:21

4K+ Views

Mutable data members are those members whose values can be changed in runtime even if the object is of constant type. It is just opposite to constant.Sometimes logic required to use only one or two data member as a variable and another one as a constant to handle the data. ... Read More

C Program for simple interest?

sudhir sharma

sudhir sharma

Updated on 09-Aug-2019 07:20:30

514 Views

Simple Interest is the product of principal amount, rate of interest and the time duration (in years) by 100.Example, Input − p=5, r=4, t=5Output − 1Explanation: Simple Interest = (Principal Amount * Rate of Interest * Number of years) / 100SI= 5*4*5/100 = 1Example#include #include using namespace std; int ... Read More

Advertisements