Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Van Lang University Faculty of Information Technology

PRACTICE 3: MULTIDIMENTIONAL ARRAY


1/ Console application, input data from keyboard:
Open Visual Studio 2019, click Create a new project: select template as the below
image:

Select t”Console App (.Net Framework)”


Naming the solution Week3.sln
2/ Write class MultidimentionArray.cs with the following methods:
➢ InputArray which allows user to enter all values of the two dimentions array
(matrix n rows and m columns) from keyboard
➢ OutputArray which allows user to print all values of the two dimentions array
to the screen
➢ AddMatrix takes two matrix arguments and return a matrix that is the result
of adding two matrix.
➢ MultiplyMatrix that return a matrix that is the result of two matrix multiply
together.
The output like this image:

Lecturer: Ms Nguyen Viet Cuong [Type here] Page 1 | 3


Van Lang University Faculty of Information Technology

Lecturer: Ms Nguyen Viet Cuong [Type here] Page 2 | 3


Van Lang University Faculty of Information Technology

(**) Write metho to display results of add and multiply matrix with horizontal style
like this image:

3/ Write method take a string as an argument and output the word that have the
maximum numbers of appearance in the string.
Example: the input string “Ho Chi Minh city is the greatest city in VietNam. It’s
has many tall building and a lots of people living here.” The output of the method
should be “city” with the numbers of appearance is 2.
4/ (**) Write method to calculate det of the squared matrix nxn that n is interger,
greater than 2 enter from keyboard.

Lecturer: Ms Nguyen Viet Cuong [Type here] Page 3 | 3

You might also like