Hello,

I am new to C and the forum. I am taking my first class in programming and am a little stuck in the assignment.

The guidelines are to write a program that allows a user to input numbers into an array to be averaged. I am supposed to use the argv function from main and not use scanf (this part is really throwing me off). Lastly it is supposed to remind the user if they forget to enter an interger ( I am not that far yet so that is an non-issue)

So my code at the time being is:

Code:
#include <stdio.h>
#include <stdlib.h>
int main(int *argv[]){
    
    int i;
    int sum = 0;
    float average;
    
    printf ( "Welcome to the Average Program. \n");
    
    for ( i = 0; i < 0; i++) {
        printf ( " Enter the numbers you would like to average: ");
               scanf ("%d", &argv[i]);
               sum += arr[i];
        }   
        
        average = (float)sum/argv[];
        printf ("\n The average is %.lf\n", average);
        
    
    getchar();
    
    return 0;
    
}
I have comipled the program without any errors but it does not run. So I know I have went awry somewhere.

What I THINK the program was doing:

1. Declaring the array.
2. Running it through a for-loop to received the inputted numbers from the user.
3. Averaging and printing the user-inputed numbers

Thanks for your help, any pointers on format or anything else I am missing is appreciated. I am here to learn.