So I wrote a program that basically takes two numbers and counts from 0 to the first number and back down, then will count the numbers between the two. It works fine, but now I need to rewrite it using three functions (one for counting up, one for counting down, and one for counting between). I don't really know how to use functions yet. I was going to try to use a void function for one of them, but I don't know how to format everything. How much change needs to be made to my program to use three different functions? Here is my code:
You need to write only one function that will have two parameters. If the first parameter is greater than the second (more precisely if the first argument is greater than the second) you count values down otherwise count them up.