#### Question Details

Description

The Question

Create your own function in C that accepts one input parameter and returns a float number. Youdecide the theme.You should provide both your C code and an example call to the C code function. Be sure toprovide an overview of what your function is doing.Provide a screen capture showing the results of testing your code in an online compiler.Be sure to test your code with several test cases and show your test case table.Submit your word or PDF file to your assignments folder no later than the due date.

Here is my code, which isn't working. Please tell me what is wrong

// C code
// This program will calculate the average of 3
// Developer: Walee Khan
// Date: March 6, 2016

#include

float Average(int);

int main ()
{
int value, sum, count, intsum;
float avg;

count = 3;
sum = 0;

while (count
printf("Enter number of heat races runn");
scanf("%d", &value);

if (value >= 0)
{
sum = sum + value;
count = count - 1;
}
else {
printf("Only enter positive integersn");
}
}
avg = Average(intsum);
printf("Average of heat race times is %fn", avg);
return 0;
}
float Average(int sum)
{
return sum/3.0;
}

#### Solution details

Solution #000121859

This paper was answered on 14-Oct-2020

STATUS

QUALITY

Approved

Oct 14, 2020

EXPERT

Tutor

#### BEST TUTORS

We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.

You can also use these solutions:

• As a reference for in-depth understanding of the subject.
• As a source of ideas / reasoning for your own research (if properly referenced)
• For editing and paraphrasing (check your institution's definition of plagiarism and recommended paraphrase).
This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student.