main()
{
int r,c sum=0 ,mat[3][3];
printf(“Enter first matrix\n”);
for(r=0; r<2; r++)
for(c=0; c<2; c++)
scanf(“%d”,&mat[r][c]);
for(r=0; r<2; r++)
{
printf(“%d/t”,mat[r][c]);
sum=sum+mat[r][c];
}
printf(“\n”);
printf(“Sum of matrix =%d\n”,sum);
getch();
}
Posted by: Wasim Javed
No comments:
Post a Comment