Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu
Showing posts with label series. Show all posts
Showing posts with label series. Show all posts

Sum of G.P

C++ Program to calculate sum of finite G.P. This program calculates the sum of the a finite G.P. and prints the result on the compiler screen. The first term 'a', number of terms 'n' and the common ratio 'r' are input by the user. Sum of an G.P. is calculated by the formula : sum=(a*(1-pow(r,n+1)))/(1-r) , nth term by : nth=a*pow(r,n-1) . For loop is used to print the whole series upto n

Calculate Sum of an A.P.

 C++ Program to Calculate sum Of An A.P. series. This program calculates the sum of the an A.P. and prints the result on the compiler screen. The first term 'a', number of terms 'n' and the common difference 'd' are input by the user. Sum of an A.P. is
calculated by the formula : sum=(n*(2*a+(n-1)*d))/2 , nth term by : nth=a+(n-1)*d . For loop is used to print the whole series upto n and the sum is printed on compiler screen

Calculate sum 1 + 2 + 3 +. . . .+n

 C++ Program to calculate the sum of a series up to N terms.This program calculates the sum of the series 1 + 2 + 3 +. . . . . . . . .+n and prints the result on the compiler screen. The last number n is input by the user. Sum of this series is calculated by the formula : sum=(n*(n+1))/2. For loop is used to print the whole series upto n and the sum is printed on compiler screen.

Program For Prime No. Series Up to N no ...........

 Program to print the series of Prime Number up to ' n '  number.Here user can input the end limit of series, so for what you waiting for..(keep enjoy)
simply use of two for loop and if else operator
 condition " i%j==0 "helps to determine the Prime no. Any further query leave message....

Print Fibonacci Series (0,1,1,2,3,5,8...)




Program which use to generate Fibonacci Series up to 0 to 15 ,, you can change the value  15 with your desire value.
The Fibonacci Sequence is the series of numbers 0,1,1,2,3,5,8,13,21,34....
The next number is found by adding up the two numbers before it.
  • The 2 is found by adding the two numbers before it (1+1)
  • Similarly, the 3 is found by adding the two numbers before it (1+2),
  • And the 5 is (2+3),
  • and so on!
Blogger Widgets

Find Us On Google, Just type - way2cplusplus -

If you have any questions on implementing or understanding this C++ Program , shoot me a comment and I'll be glad to help! :) :)