answersLogoWhite

0

there are different ways of writing dis program... 1+x+(x*x)+(x*x*x*)+....has a formula for its sum... the sum for a geometric series with a as initial value and x as common ratio is (a*(pow(r,n)-1))/(r-1).... where a=1;r=x.. accept the values of x and n through keyboard remember to take x as a float value!! apply the formula and be careful about the parantheses. happy programming!!!

User Avatar

Wiki User

āˆ™ 16y ago

What else can I help you with?

Continue Learning about Engineering

Write a shell program to generate fibnacci series using while loop?

//WAP to print fibonacci series using do-while loop.? using System; class Fibonacci { public static void Main() { int a=1,b=1; int sum=0; Console.Write("Enter Limit:"); int n=Int32.Parse(Console.ReadLine()); Console.Write(a); Console.Write(b); do { sum=a+b; a=b; b=sum; Console.Write(sum); } while(sum<n); } } By-Vivek Kumar Keshari


How to Write a program using while loop to find the sum of integers 73 through 415 inclusive?

#include using std::cin;using std::cout;using std::endl;int main(){int number1 = 73;int number2 = 415;int sum = 0;for (int i = number1; i


What is the first line of every FORTRAN program and what does it tell the compiler?

The name of the program. For example: program sum ! This is a comment. Your program's code goes here... end program sum


Find the sum of 1 plus 2 plus 3 plus . plus n nos using c program?

if (n%2==0) sum=n/2*(n+1); else sum=(n+1)/2*n;


How do you write a program to calculate total of a number series 1 to 25 using for statement in java and finally display the total?

To calculate the total of the number series from 1 to 25 in Java using a for loop, you can initialize a variable to hold the total sum, then iterate through the numbers from 1 to 25, adding each number to the total. Here's a simple example: public class SumSeries { public static void main(String[] args) { int total = 0; for (int i = 1; i <= 25; i++) { total += i; } System.out.println("Total: " + total); } } This program declares an integer variable total, uses a for loop to sum the integers, and finally prints the result.

Related Questions

What is the assembly program to generate a geometric series and compute its sum The inputs are the base root and the length of the series The outputs are the series elements and their sum?

What is the assembly program to generate a geometric series and compute its sum The inputs are the base root and the length of the series The outputs are the series elements and their sum?


How can you tell if a infinite geometric series has a sum or not?

The geometric series is, itself, a sum of a geometric progression. The sum of an infinite geometric sequence exists if the common ratio has an absolute value which is less than 1, and not if it is 1 or greater.


What is the sum of an infinite geometric series is?

It depends on the series.


What is the sum of the infinite geometric series?

The sum of the series a + ar + ar2 + ... is a/(1 - r) for |r| < 1


What is the formula for the sum of an infinite geometric series?

your face thermlscghe eugbcrubah


A geometric progression has a common ratio -1/2 and the sum of its first 3 terms is 18. Find the sum to infinity?

The sum to infinity of a geometric series is given by the formula Sāˆž=a1/(1-r), where a1 is the first term in the series and r is found by dividing any term by the term immediately before it.


If the sum of an infinite geometric series is 12 and the common ratio is one third then term 1 is what?

Eight. (8)


Determine the sum of the infinite geometric series -27 plus 9 plus -3 plus 1?

-20


A geometric series has first term 4 and its sum to infinity is 5 Find the common ratio?

1/8


Is the sum of two geometric sequence a geometric sequence?

No.


The sum to three terms of geometric series is 9 and its sum to infinity is 8. What could you deduce about the common ratio. Why. Find the first term and common ratio?

The geometric sequence with three terms with a sum of nine and the sum to infinity of 8 is -9,-18, and 36. The first term is -9 and the common ratio is -2.


Write a program to find the sum of sine series?

Writing a program for a sum of sine series requires a rather long formula. That formula is: #include #include #include main() { int i,n,x; .