Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server T-SQL Recipes

Authors: David Dye, Jason Brimhall

4th Edition

1484200616, 9781484200612

More Books

Students also viewed these Databases questions