# CS 136 Project: LANGUAGE FEATURES: For [only] this question, you may use recursion . Do not define global mutative variable.

CS 136 Project:

LANGUAGE FEATURES: For [only] this question, you may use

recursion

. Do not define global mutative variable. (Write in C)

For these questions, you should recursively use read_int until a READ_INT_FAIL occurs. You may assume there will be at least one int in the input.

When printing ints, you should simply print each one on a newline using “%dn”.

We have provided you with a question q2ex as an example of how to read in the input recursively. This program reads in input and then prints out the numbers in the reverse order that they appeared in the input. You may discuss this example with your fellow students, but not how you could modify it to solve the problems below.

1. Write a program that reads in ints, and prints the numbers in their original order and then in reverse order.
2. Write a program that reads in ints, and determines the count of how many numbers were read in. It prints the numbers in reverse order, adding the count to each number.
3. Write a program that reads in ints, and determines the smallest (lowest) number that was read in. It prints the numbers in reverse order, subtracting the smallest number from each number.

Q2ex as below:

#include “cs136.h”

//  and then prints the integers in their reverse order

//     produces output

void reverse_input(void) {

reverse_input();

printf(“%dn”, n);

}

}

int main(void) {

reverse_input();

}

I have no idea how to do question 2 and 3. They do not allow global mutation and only recursion. So I’m stuck in here……

## Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
\$26
The price is based on these factors:
Number of pages
Urgency
Basic features
• Free title page and bibliography
• Unlimited revisions
• Plagiarism-free guarantee
• Money-back guarantee
On-demand options
• Writer’s samples
• Part-by-part delivery
• Overnight delivery
• Copies of used sources
Paper format
• 275 words per page
• 12 pt Arial/Times New Roman
• Double line spacing
• Any citation style (APA, MLA, Chicago/Turabian, Harvard)

# Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

### Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

### Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

### Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.