Guest User

Untitled

a guest
Jun 22nd, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.83 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. #define MAXR 100
  4. #define MAXC 100
  5. int main ()
  6. { int ncol,nrighe,j,i;
  7. float somma,app;
  8. typedef float matrix[MAXR][MAXC];
  9.  
  10. printf("\n ****Legge e fa la somma di un vettore bidimensionale****\n");
  11. printf("\nInserisci quante colonne deve avere la tabella:  ");
  12. scanf ("%d",&ncol);
  13. printf("\nInserisci quante righe deve contenere la tabella:   ");
  14. scanf ("%d",&nrighe);
  15. printf("\nInserisci i numeri seguiti da spazio:\n");
  16. for(i=0;ncol=i;i++);
  17.                     {for(j=0;nrighe=j;j++)
  18.                     scanf("%f",&matrix[j][i]);
  19.                     }
  20. // stampa vettore
  21. printf("\nIl vettore inserito รจ:\n");
  22. for(i=0;nrighe=i;i++)
  23.                     {for(j=0;ncol=j;j++)
  24.                     printf("%f",& matrix[j][i]);
  25.                     printf("\n");
  26.                     }
  27. system ("pause");
  28. return 0;
  29. }
Add Comment
Please, Sign In to add comment