Created
September 11, 2012 22:47
-
-
Save only-entertainment/3702748 to your computer and use it in GitHub Desktop.
Skeleton Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
// Define functions | |
void display_average(float); | |
int get_user_input(int); | |
float get_user_inputs(int); | |
float calculate_average(float, int); | |
int main(int argc, char * argv[]) { | |
float accumulator = 0.0; | |
int num_of_times = 0; | |
float average = 0.0; | |
num_of_times = get_user_input(1); | |
accumulator = get_user_inputs(num_of_times); | |
average = calculate_average(accumulator, num_times); | |
display_average(average); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment