Link to home
Start Free TrialLog in
Avatar of beachbumm
beachbumm

asked on

writing a nested loop structure

Consider the two-dimensional and one-dimensional array structures defined below:

           double table[5][5]=
             {
                { 3, 4, 5, 6, 3},
                { 2, 1, 2, 1, 1},
                { 3, 2, 1, 4, 9},
                { 1, 0, 0, 1, 1},
                { 9, 2, 6, 4, 9},

             }

           double lst[5] = {2,1,2,3,4};

I need to write a nested for loop structure to subtract the array lst from each row of the two-dimensional array table. for example, after completion, the first row of table will be 1,3,3,3,-1 since 3-2=1, 4-1=3, 5-2=3, 6-3=3, 3-4=-1
ASKER CERTIFIED SOLUTION
Avatar of imladris
imladris
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial