2dimensional array

I need to make a program that will input for the salary per 7days in a week.. the output must be like this :

Week 1
Sunday:20
Monday: 100
Tuesday: 200
Wednesday: 50
Thursday: 40
Friday:100
Saturday:50

Week 2
Monday: 7
Tuesday: 5
Wednesday: 7
Thursday: 10
Friday: 10
Saturday: 20
Sunday: 100

wk M T W Th F S Su Total amount:
1 20 100 200 50 40 100 50 190
2 7 5 7 10 10 20 100 159
------------------------------------
27 105 207 60 50 120 150


my starting code is like this:
int i;
int j;
int allowance [7][4];
for (i=0; i <4; i++)
for(j=0; j<7;j++)
{
cout << "Enter the amount of salary : ";
cin >> allowance [j][i];
}

i am having a difficult time on how to continue making this code
Last edited on
/Sigh
Please, tell the name of courses you have this assigment for. And name of your school.
I really want to know from where are several identical threads been created every week.
I guess you want something like that:
Week 1
Monday: 1
Tuesday: 5
Wednesday: 10
Thursday: 50
Friday: 100
Saturday: 500
Sunday: 1000
Week 2
Monday: 1
Tuesday: 5
Wednesday: 10
Thursday: 50
Friday: 100
Saturday: 500
Sunday: 1000
Week 3
Monday: 1
Tuesday: 5
Wednesday: 10
Thursday: 50
Friday: 100
Saturday: 500
Sunday: 1000
Week 4
Monday: 1
Tuesday: 5
Wednesday: 10
Thursday: 50
Friday: 100
Saturday: 500
Sunday: 1000
   M  T  W  Th   F    S   Su  Ttl
1  1  5 10  50 100  500 1000 1666
2  1  5 10  50 100  500 1000 1666
3  1  5 10  50 100  500 1000 1666
4  1  5 10  50 100  500 1000 1666
   4 20 40 200 400 2000 4000

Look for it :) It's nearby.
Last edited on
Topic archived. No new replies allowed.