hi, well i need help with my hw, it deals with arrays and arguments but i have no idea how to do it, like im taking a online class and the book is basically useless, so i was wondering if u guys could help out a bit .

This is the hw problem:

Problem Description

Each year the Department of Traffic Accidents receives accident count reports from a number of cities and towns across the country. To summarize these reports, the department provides a frequency distribution printout that gives the number of cities reporting accident counts in the following ranges:
0 – 99
100 – 199
200 – 299
300 – 399
400 – 499
500 or above

The department needs a computer program to take the number of accidents for each reporting city or town and add one to the count for the appropriate accident range. After all the data have been processed, the resulting frequency counts are to be displayed.

Problem Requirement
a) You must create a file and save it as Program7.c file.
b) You must use an array for the counts of the accident ranges.
c) The results must be displayed in a tabular format.
d) The program must have one user-defined function named updateRange with 2 arguments: accident count and the range array. The function should use the accident count to increase the count for the appropriate accident range array.
e) The program must have another user-defined function named displayRange with the range array as the argument. The function should use a loop to display the content of the range array.
f) Your program should run correctly with the same inputs and outputs as given in the sample run.




This is wht i have so far :/ i know its not right

Code:
#include <stdio.h>

main()
{

int index, a, b, c, d, e, f, city;
printf("Enter current city\n");
scanf("%lf", city);

 for(index=0; index < 99; index++)

        {

                printf("Enter number of accidents in current city\n");
                scanf("%lf",a[index]);

        }

        for(index=0; index < 100-199; index++)

        {

                printf("Enter number of accidents in current city\n");
                scanf("%lf", b[index]);

        }

        for(index=0; index < 200-299; index++)

        {

                printf("Enter number of accidents in current city\n");
                scanf("%lf", c[index]);

        }

 

        for(index=0; index < 300-399; index++)

        {

                printf("Enter number of accidents in current city\n");
                scanf("%lf", d[index]);

        }

        for(index=0; index < 400-499; index++)

        {

                printf("Enter number of accidents in current city\n");
                scanf("%lf", e[index]);

        }

 

        for(index=0; index < 500; index++)

        {

                printf("Enter number of accidents in current city\n");
                scanf("%lf", f[index]);

        }

 

        printf("The accident count for the current city is [index]\n");

                 

                return 0;

}