Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as C by yara ( 15 years ago )
#include <stdio.h>
#include <math.h>

main()
{
    int l, c, i, j, spin;
    int matriz[l][c];
    spin = 1;
    printf("De as dimenssoes da matriz (linha e coluna)\n");
    scanf("%d %d", &l, &c);

    printf("-> Matriz\n");

    for(i=1;i<=l;i++) {
       for(j=1;j<=c;j++){
         matriz[i][j] = spin;
         spin++;
       }
    }

    for(i=1;i<=l;i++) {
       for(j=1;j<=c;j++) {
          printf("=", matriz[i][j]);
       }
       printf("\n");
    }
    return 0;
}

 

Revise this Paste

Your Name: Code Language: