answersLogoWhite

0

#include<math.h> main()

{

int s=1,n,x,i;

clrscr();

printf("enter value of n");

scanf("%d",&n);

printf("enter value of x");

scanf("%d",&x);

for(i=1;i<=n;i++)

{

s=pow(x,i);

}

printf("sum of series=%d",s);

getch();

}

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Write a c program to accept a numbers and generate square root cube and exponential values?

write a c program to accept a number and generate a square root cube and exponential values


Can you write a program to generate sinx table where x varies from 0 to 180 in steps of 15?

Yes, I can.


Write a program to generate uppercase using cSharp?

string s = "asdfqwer"; s = s.ToUpper(System.Globalization.CultureInfo.CurrentCulture);


Write a c program to generate student mark details using union and find total and average and grade?

write a c program to display marks,total,average,grade using union


How do you write a program that removes all occurrences of a given X in a given sequence of numbers?

You do nothing! A sequence of numbers will contain no X and so nothing needs doing!


How do you generate the Fibonacci sequence?

Generate Fibonacci sequence by adding the two previous integers together to get the next number in the sequence. Starting with the lowest two number on the real number line. 0,1,1,2,3,5,8,13,21,34,55,89,144 etc.


How do I write a program to do the following... Write a VBA code to take the TippingBucketData.txt file and process it to generate an output file.?

Without knowing the contents of the TippingBucketData.txt file nor how to process it, it would be impossible to say how such a program would be written.


Is there any tool to generate sequence diagrams for javascript?

Check outhttps://github.com/bramp/js-sequence-diagrams


How do you write a sequence to a story?

A sequence is just an ordered set of events. You write it by telling what happened in order.


How can I generate a random DNA sequence?

To generate a random DNA sequence, you can use a programming language like Python and its random module to create a sequence of random nucleotides (A, T, C, G) of a desired length. This can be achieved by writing a script that randomly selects nucleotides and concatenates them to form the DNA sequence.


Does interpreter generate an object program from the source program?

No, that's what the compiler does.


How do you write a sequence?

write something, leave a space, write something else.