Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // main.c
- // Esercitazione
- //
- // Created by Nicola Beneduce on 17/01/18.
- // Copyright © 2018 Nicola Beneduce. All rights reserved.
- //
- #include <stdio.h>
- #define R 3
- #define C 3
- int main()
- {
- int matrice [R][C];
- int i,j,k=1;
- for(i=0;i<R;i++)
- {
- for (j=0;j<C;j++)
- {
- matrice[i][j]=k;
- k++;
- }
- }
- for(i=0;i<R;i++)
- {
- for (j=0;j<C;j++)
- {
- printf("\t %d",matrice[i][j]);
- }
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement