Question: The first and second integers in the input are read into variables previous _ in and current _ in , respectively. Write a loop that

The first and second integers in the input are read into variables previous_in and current_in, respectively. Write a loop that iterates
while current_in is 8 plus previous_in. In each iteration:
Output current_in, followed by ' is 8 plus ', previous_in, and '. Sequence is increasing arithmetically'. on one line.
Assign previous_in with current_in.
Read the next integer from input and assign current_in with the integer read.
After the loop, output the last integer read followed by ' breaks the sequence.' on one line.
Click here for example
Note: Assume that input has at least two integers.
 The first and second integers in the input are read into

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!