Jul 11, 2018 at 5:53pm
I need to make a two-dimensional table that scans monthly rainfall of the western, eastern, and central regions.
The user must enter all 12 numbers for each region.
The input should look something like this:
Western:
1
1
1
1
1
1
(ending around the 12th #)
Eastern:
(same thing as the first)
Central
(same)
|
What I did and it's a wreck:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
int main()
{
int western[12][12], eastern[12][12], central[12][12], x=1;
printf("Enter the rainfall in the western, eastern, and central regions. \n\n");
for(i=0; i<12 ;i++)
{
printf("# %d \n", x++);
printf("western: ");
//printf("eastern: \n");
for(j=0;j<12;j++)
{
scanf("%d", &western);
//scanf("%d", &eastern);
}
}
//printf("central: ");
// scanf("%d", ¢ral);
//printf("\n");
}
|
Last edited on Jul 11, 2018 at 8:41pm