Can anyone help me with this code i have started it but then I got confused thanks.
Option 1: Create two-dimensional array choc_yourname[50][7] using the data in file chocolates.txt and print the values of this array on the screen
Option 2: Calculate the average quantity of sold chocolates per day and per week. Calculate the standard deviation for the whole sales matrix, and the standard deviation per day and per week.
Option 3: Identify which week (out of 50 weeks) produced the largest sales of chocolates and which day (out of 7 days) produced the largest sale of chocolates. For each week, calculate the number of days more than 20 chocolates were sold.
Option 4: Enable the user to modify chocolates.txt. The user should be able to change any element of the array, and also to insert new rows in the array. The change should be updated in a file called chocolates2.txt
{#include <stdio.h>
#include <stdlib.h>
int main()
{
int choc[50][7],i,j;
FILE *fp;
// printf("Enter the name of file you wish to see\n");
//gets("file_name");
fp = fopen( "chocolate.txt","r");
for (i=0; i<=50-1; i++)
for (j=0; j<=7-1; j++)
fscanf(fp,"%d",&choc[i][j]);
for (i=0; i<=50-1; i++){
for (j=0; j<=7-1; j++){
printf ("%d ",choc[i][j]);
}
printf("\n");
}
return 0;
}