Study guides

☆☆

Q: How can you find the next number in a series of numbers?

Write your answer...

Submit

Still have questions?

Continue Learning about Engineering

Given a set of n numbers, to find the largest is a simple matter. Iterate through the numbers with a controlled loop structure using a maxValue variable. If the next variable is greater than maxValue, then that variable is the new maxValue. This continues until there are no more variables. Once that occurs, maxValue will have the largest number in the set of n numbers.

LXI H, XXXXH :Memory location to store the series MOV M, 00H :Store first number of series INX H :Go to next location MOV M, 01H :Store second number of series INX H :Go to next location MVI D, COUNT :Initialize counter MVI B, 00H :Initialize variable to store previous number MVI C, 01H :Initialize variable to store current number Back : MOV A, B :Load first number in accumulator ADD C :Add two numbers MOV B, C :Current number is now previous number MOV C, A :Save result as a new current number MOV M, A :Store next number in memory INX H :Go to next memory location DCR D :Decrement count JNZ Back :If count=0 go to Back HLT :Stop.

As you can see, this series is the sum of the sequence: 1, 2, 3, 4, 5, 6. That is to say: 1 + 2 = 3 3 + 3 = 4 6 + 4 = 10 10 + 5 = 15 15 + 6 = 21 To program this in C, you would want a simple incremental counter which would be added to the series sum on each iteration of the loop. { int c = 2; int sum = 1; // loop until you find all the numbers you want while(1) { // increase the running sum to find the next next number in the series sum += c; // increment our counter ++c; } }

CLS PRINT "PROGRAM: Add up 10 numbers entered from the keyboard;" PRINT " then, printout their sum total." PRINT sumTotal = 0 FOR eachNo% = 1 TO 10 IF eachNo% < 10 THEN PRINT " "; PRINT eachNo%; "> "; INPUT "Enter number: ", number sumTotal = sumTotal + number NEXT PRINT PRINT "The sum total of your 10 numbers is: "; sumTotal END

Biggest = 0 For N = 1 to 10 If Number(N) > Biggest then Biggest = Number(N) Next N Print "The biggest of the ten numbers is "; Biggest Print "That was fun. Thanks for playing." END

Related questions

The sum of the previous two numbers in the series.

There is no series of number: just one very large number!

the answer is three

-57The first two numbers in the series has a difference of 89. The next two numbers (209, 129) has a difference of 80. The next two (129,58) has a difference of 71. As you can see the differences change by 9, so the next two numbers in the series (58, -4) has a difference of 62. Following this pattern, the next two numbers in the series will have a difference of 53. So the next number in this series will be (-4-53 = -57).

You'll have to separate those numbers with spaces. There's no way to tell what numbers are in the series--it's just one long number.

A series is a set of partial sums of sequences of numbers. A single number, such as 135, does cannot define a series.

The next two number in the series are: 5 & 16

17 cause it is the next prime number

This is the series of square numbers, (16= 4*4). The next number is 5*5=25.

There are no such numbers. Given any "next" number, it is possible to find one between 0.74 and that number. And then between 0.74 and THAT number and so on.

First series of numbers are the number of wins. The second series of numbers is loses. and the Third series of numbers is Ties. (Wins-Losses-Ties)

-26.You are subtracting each number in the series by 25 to find the next number.So 49 - 25 = 2424 - 25 = -1And -1 - 25 = -26The next number would then be -26 - 25 = -51etc...

People also asked