Algorithm#1 - 6 If Sum<(n(n 1/2 then input(Sum X 1 as X...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Kevin Cuddihy Algorithm Tinglin Liu, Section 4 1. Start 2. Ask user how many numbers they want to calculate 3. Store number as n 4. Input number X where 1<X<n 5. 1+x= Sum
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 6. If Sum < (n(n+1))/2), then input (Sum+X+1) as X into the algorithm and repeat 7. Add 1 + X until Sum= (n(n+1))/2) 8. Display Sum Yes...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online