Skip to content

Instantly share code, notes, and snippets.

@only-entertainment
Created September 11, 2012 22:47
Show Gist options
  • Save only-entertainment/3702748 to your computer and use it in GitHub Desktop.
Save only-entertainment/3702748 to your computer and use it in GitHub Desktop.
Skeleton Code
#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