• :00Days
• :00Hours
• :00Mins
• 00Seconds
A new era for learning is coming soon Suggested languages for you:

Europe

Answers without the blur. Sign up and see all textbooks for free! Q32E

Expert-verified Found in: Page 203 ### Discrete Mathematics and its Applications

Book edition 7th
Author(s) Kenneth H. Rosen
Pages 808 pages
ISBN 9780073383095 # all terms of a finite sequence of integers that are greater than the sum of all previous terms of the sequence.

An algorithm for determining all terms of a finite sequence of integers that are greater than the sum of all previous terms of the sequence

procedure list ( ${a}_{1},{a}_{2},...,{a}_{n}:$ list of integers)

j = 1

sum := 0

for k = 1 to n

The outcomes list is $\left\{resul{t}_{1},resul{t}_{2},......\right\}$ with all terms of a finite sequence of integers that are greater than the sum of all previous terms of the sequence

See the step by step solution

## Step 1: Write the steps required to follow to determine Algorithm.

First set j equals to 1 and sum equals to 0 .

Then use for loop to examine given list and condition for while loop is k =1 to n .

In for loop compare element ${a}_{k}$ and sum by using the if loop with condition ${a}_{k}>sum$ . When if loop becomes true add ${a}_{k}$ to the list resulr at position j and that will increase j by 1 .

The sum will be determined accordingly and the list of result will be our answer.

## Step 2: Determine the steps of the algorithm.

By using the above conditions, the algorithm finds all terms of a finite sequence of integers that are greater than the sum of all previous terms of the sequence

procedure list ( ${a}_{1},{a}_{2},..,{a}_{n}$ list of integers)

$j=1\phantom{\rule{0ex}{0ex}}sum:=0$

for k = 1 to n

## Recommended explanations on Math Textbooks

94% of StudySmarter users get better grades. 