Challenge: Print a range of numbers

- This is a second challenge for this chapter…and it's quite simple but it will demonstrate…your understanding of the concept of recursion.…You will simply be asked to implement…a recursive function according to the following rules.…Write a program in C, that asks the user…to enter two integer values.…Then, write a recursive function that uses the two values…as lower and upper bounds of a series.…Recursively, print all the numbers from small to large.…

Display the recursive call counter.…Just to repeat and make sure you understand the challenge,…let's say you enter the numbers 10 and 50,…your recursive function will print all the numbers…starting with 10 and stop at 50.…

Resume Transcript Auto-Scroll

Author

Released

6/30/2014

Widely used for both systems and application development, C is a powerful language at the heart of many more modern languages, like JavaScript and Objective-C. In this course, professor Isac Artzi dissects the anatomy of C, from data types, strings, and variables to simple functions. He'll show how these basic elements fit together in control structures like loops and if-else statements—where the real logic behind your code comes into play. Plus, learn how C organizes information into arrays and how you can manage memory resources with pointers.

C is a great first step for new programmers, and a way to broaden and deepen your knowledge if you've already programmed for a while. Press Play to start learning.