Ask Question

2. Use loops to create a 4X6 matrix in which the value of each element is two times its row number minus three times its column number. For example, the value of element (2,5) is 2x2-3x5=-11.

+2
Answers (1)
  1. 29 April, 10:29
    0
    for (i=0; i<4; i++)

    {

    for (j=0; j<6; j++)

    {

    A[ i ][ j ] = 2 * i - 3*j;

    }

    }

    Explanation:

    In this loop for each i = 0,1,2,3 we fill the the corresponding column values. and then move to next i value i. e. row.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “2. Use loops to create a 4X6 matrix in which the value of each element is two times its row number minus three times its column number. For ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers