Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define MAXR 100
- #define MAXC 100
- int main ()
- { int ncol,nrighe,j,i;
- float somma,app;
- typedef float matrix[MAXR][MAXC];
- printf("\n ****Legge e fa la somma di un vettore bidimensionale****\n");
- printf("\nInserisci quante colonne deve avere la tabella: ");
- scanf ("%d",&ncol);
- printf("\nInserisci quante righe deve contenere la tabella: ");
- scanf ("%d",&nrighe);
- printf("\nInserisci i numeri seguiti da spazio:\n");
- for(i=0;ncol=i;i++);
- {for(j=0;nrighe=j;j++)
- scanf("%f",&matrix[j][i]);
- }
- // stampa vettore
- printf("\nIl vettore inserito รจ:\n");
- for(i=0;nrighe=i;i++)
- {for(j=0;ncol=j;j++)
- printf("%f",& matrix[j][i]);
- printf("\n");
- }
- system ("pause");
- return 0;
- }
Add Comment
Please, Sign In to add comment