- Author: Elliott Plack
- Date: 03 OCT 2013
- Class: COSC 501 @ Towson University
Two simple math functions in this program. The first asks the user for 10 inputs, and then return the sum of them. The second function that asks for an integer and then computes the sum of 0 + all integers up to the input.
First ask the user if they want to perform the first or second function (use switch). For the first, make a for loop that will iterate through inputs until 10 are received, all the while using adding the sum to the previous input. Return that value and go back to the main function. For the other function, input a integer and then add the value of each integer before it, sequentially. Return that value to the main.