Each year the Department of Traffic Accidents receives accident count reports from a number of cities and towns across the country. Given details of 'n' days, develop an algorithm and write a program to determine the average number of accidents and for each day, print the difference between the number of accidents on that day and average. For example, if the number of accidents is 5 and the values are 10, 12, 15, 13, 5 then average is 11 and the difference of values are 1, 1, 4, 2, 6 Use the following functions signature void read Count(int *, int); float find Mean(int *, int); void print_Diff(int *, int, float); For example: Test Input Result 10 1 12 4 15 13 5

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 15PE
icon
Related questions
Question
I want C code and algorithm also..
Each year the Department of Traffic Accidents receives accident count reports from a number of cities and towns across the country.
Given details of 'n' days, develop an algorithm and write a program to determine the average number of accidents and for each day,
print the difference between the number of accidents on that day and average. For example, if the number of accidents is 5 and the
values are 10, 12, 15, 13, 5 then average is 11 and the difference of values are 1, 1, 4, 2, 6
Use the following functions signature
void read_Count(int *, int);
float find_Mean(int *, int);
void print_Diff(int *, int, float);
For example:
Test Input Result
1
1
10
1
12
4
15
13
Transcribed Image Text:Each year the Department of Traffic Accidents receives accident count reports from a number of cities and towns across the country. Given details of 'n' days, develop an algorithm and write a program to determine the average number of accidents and for each day, print the difference between the number of accidents on that day and average. For example, if the number of accidents is 5 and the values are 10, 12, 15, 13, 5 then average is 11 and the difference of values are 1, 1, 4, 2, 6 Use the following functions signature void read_Count(int *, int); float find_Mean(int *, int); void print_Diff(int *, int, float); For example: Test Input Result 1 1 10 1 12 4 15 13
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Program on Numbers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning