Cse115 Lab Manual 16 2D Array
Cse115 Lab Manual 16 2D Array
void main()
{
int A[3][3], B[3][3], row, col;
Assignment:
1. Write a C program to find sum of border elements (bold ones) of a matrix
Example:
If the array elements are:
1234
4567
7899
Output should be: Sum of main border elements = 54
because 1+2+3+4+7+9+9+8+7+4 = 54
2. Write C program to read two r*c matrices A and B from user (r, c are user inputs) and
print the matrix 5A+7B+9 (add 9 with each element of the matrix 5A+7B to get the
resultant matrix).