Question: I want you to design a code on C language (not C++). The user has to enter a positive integer, and the program must work

I want you to design a code on C language (not C++). The user has to enter a positive integer, and the program must work until the user enters 0. Each input has a number starting from 1. (e.g. Input 1, Input 2, ...) If the user enter an odd number, the output should start from that number and count backwards by skipping the amount of numbers of input line. (till reaching O) If the user enter an even number, the output should start from 0 and count by skipping the amount of numbers of input line, until reaching that number. Example: Input 1 = 7 Output = 7 6 5 4 3 2 10 Input 2 = 4 Output = 0 24 Input 3 = 8 Output = 0 36 Input 4 = 9 Output = 9 5 1 Input 5 = 0 completed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
