Question: Problem 4 - The Wienni Waltz Complete the following program that takes in an integer I and a starting number a and prints out the

 Problem 4 - The Wienni Waltz Complete the following program that

Problem 4 - The Wienni Waltz Complete the following program that takes in an integer I and a starting number a and prints out the first 5 terms in the sequence that follows the following rules (note that n, denotes element number i in the sequence]: nima It n, is greater than I, then 8-1-n / 3 if n is less than then 1-3[n+8) . if n is equal to I, then n.1 - 17-21 There should be a single space separating successive numbers in the sequence. Input Format For Custom Testing There are two lines of input. The first line contains an integer I that can be any inteper. The second line contains an integer a that can be any integer. Sample Case 1 Sample Input For Custom Testing 10 20 Sample Output Sample Case 2 Sample Input For Custom Testing Sample Output

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!