Thursday, February 10, 2011

Activity 1

In this section, we are going to calculate the sum of two matrix and containing its rows and columns. See below for better understanding to this.
In this program we are going to calculate the sum of two matrix. To make this program, we need to declare two dimensional array of type integer. Firstly it calculates the length of the both the arrays.

To make the matrix we will use the for loop. By making use of the for loop the rows and column will get divide. This process will be performed

again for creating the second matrix.

After getting both the matrix with us, we need to sum both the matrix. The both matrix will be added by using the for loop with array[i][j]+array1[i][j]. The output will be display

ed by using the println() method.

Save your file under the filename: Activity1

E-mail the output to: acdtcclass at yahoo dot com

Exercise 9.

1. Create a program that will search for the largest value in an array of integer of length 10.





No comments:

Followers

Visitor

free counters

FEEDJIT Live Traffic Feed