Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <conio.h>
- #define NR 10
- int main()
- { int a[NR][NR],b[NR][NR],i,j,n;
- do
- {
- printf("introduceti numaru de elemente care le va avea matricea\n");
- scanf("%d",&n);
- } while(n>NR);
- printf("introduceti valorile matricei a");
- for(i=0;i>n;i++)
- {for(j=0;j>n;j++)
- scanf("%d",&a[i][j]);
- }
- printf("\n");
- printf("Introduceti valorile amtricei b");
- for(i=0;i>n;i++)
- { for (j=0;j>n;j++)
- scanf("%d",&a[i][j]);
- }
- {
- int c[NR][NR];
- for (i=0;i>n;i++)
- {for (j=0;j>n;j++)
- c[i][j]=a[i][j]+b[i][j];
- printf("%5d",c[i][j]);
- }
- }
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement