answersLogoWhite

0

Write a program to generate the sequence?

Updated: 8/10/2023
User Avatar

Vivet

Lvl 1
14y ago

Best Answer

#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

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

The series is:

1

22

333

4444

55555

Program:

void main()

{

int multfactor = 1,x;

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

{

x = i*multfactor;

printf("%d\n",x);

multfactor = (multfactor << 3) + (multfactor << 1) + 1;

}

}

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

write a shell script to print thi format
*
**
***
****
*****

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

int main (void) { puts ("the sequence"); return 0; }

This answer is:
User Avatar

User Avatar

Learn bay

Lvl 8
2y ago

#include

#include

void main()

{

int num=9,i;

clrscr();

printf("%d ",num);

for(i=4;i
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program to generate the sequence?
Write your answer...
Submit
Still have questions?
magnify glass
imp
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


Does interpreter generate an object program from the source program?

No, that's what the compiler does.


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.


Write an assembly language program to generate a square wave of 10khz and 5Mhz clock?

You will need to have a little bit of computer science knowledge. This will help you to make the programing.


Could you write a java program that randomly generate a number plate for a car registration using the random method from Maths class eg NLF810?

yes, use for loop;;