Finding the problem is the first task based on the input, output format and exe file provided. Then think the logic and code the same.
The task in this problem is to print 10 terms of series starting with number input by user. Terms are determined by whether number is even or odd.
After having number of test cases as input, each test is to be inputted and processed. Each test case contains a number (n). Next term of series(s) is determined by: s=n/2 if n is even, s=3*n+1 if n is odd.
You need to print first 10 terms of series.
Author’s solution can be found here
Exe file for the problem can be found here