Course Solutions Uncategorized (Solved) : 1 4 7 10 2 5 8 11 3 6 9 12 Want Print Matrix C Language Formula Come 3 J 1 Include Int Mai Q34209684 . . . .

(Solved) : 1 4 7 10 2 5 8 11 3 6 9 12 Want Print Matrix C Language Formula Come 3 J 1 Include Int Mai Q34209684 . . . .

 

1 4 7 10
2 5 8 11
3 6 9 12

I want to print this matrix in c language.

How did this formula come out? (3 * j + i + 1);

#include <stdio.h>

int main()
{
int y[3][4];
int i, j;
for (i = 0; i < 3; i++)
{
for (j = 0; j < 4; j++)
printf(“%d “, 3 * j + i + 1);
printf(“n”);
}
return 0;
}

Expert Answer


An answer will be send to you shortly. . . . .

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Solved) : Compiler Design Modify Code Memory Management Project Given Firstfit Please Finish Bestfit Q30121385 . . . .(Solved) : Compiler Design Modify Code Memory Management Project Given Firstfit Please Finish Bestfit Q30121385 . . . .

<p><strong>Compiler Design - Modify Code:</strong></p><p><strong>Memory Management project</strong></p><p><strong>Given FirstFit, please finish BestFit and WorstFit?Follow the form of FirstFit!?</strong></p><p><strong>Do not provide different code.</strong></p><p><strong>-------------------------------------------------------------------------------------</strong></p><p>//FirstFit.hpp</p><p>#ifndef FIRSTFIT_HPP</p><p>#define FIRSTFIT_HPP</p><p>#include "Policy.hpp"</p><p>class FirstFit : public Policy</p><p>{</p><p>public:</p><p>void* onMalloc(int size);</p><p>void