You are on page 1of 9

"

:
-1 3.5.
-2 .
-3 .
-4 :.
-5 - .
-6 5- .
.
-7 . .
-8 . .
-9 .
-10 " . . "

:
' 49 7 . 1 .49
' 7 . .

10

:
1 ( 20 ).
. 8X8 .
, .
.
.
' ( ) (
).
.
' 1 ( 20 ) .
' .

25

10 .
.
.
.(no) n

25

static void Main(string[] args)


{
int[,] Doublearray = new int[5,2];
int[] SimpleArray = new int[10];

public static void Fillarray(int[,] array2, int[] array1)


{
int count = 0;
for (int i = 0; i<array2.GetLength(0); i++)
{

Fillarray(Doublearray, SimpleArray);
DisplayArray(Doublearray);

for (int j = 0; j<array2.GetLength(1); j++)


{
array2[i, j] = array1[count];
count++;

Console.WriteLine();
SwappArray(Doublearray);
DisplayArray(Doublearray);

}
Console.WriteLine();

Console.ReadLine();
}

}
}

public static void SwappArray(int[,] array)


{
int temp = 0;
for (int i = 0; i < array.GetLength(0); i++)
{
for (int j = 0; j < array.GetLength(1) - 1; j++)
{

: SimpleArray

25

93

65

69

66

25

42 47

if (array[i, j + 1] < array[i, j])


{
temp = array[i, j];
array[i, j] = array[i, j + 1];
array[i, j + 1] = temp;
}

}
}
}

public static void DisplayArray(int[,] array)


{
for (int i = 0; i < array.GetLength(0); i++)
{
for (int j = 0; j < array.GetLength(1); j++)
{
Console.Write("\t" + array[i, j]);

10

}
Console.WriteLine();
}

16

' :
1 ( DoubleArray )
2 SwappArray
3 ]DoubleArray[I,j+1] DoubleArray[I,j
4 temp
' : , .

' .

. .
.
' .
' .
( ) ( ) .
.
: : . : 95 2
2 .95

30

school

mark
pupils[] pupils

pupils

( , , , )

)(school
)(ToString

PRIVATE
PRIVATE
0- 100-
1- 3-

;int note
;int weight
get/set note
get/set weight

pupil

mark[] pupilMarks

PRIVATE

;string first_name

PRIVATE

;string last_name

PRIVATE
.

get/set first_name

get/set last_name

0
, .


( , , , )
. unknown

;string id

get/set id
double average

)(ToString
)pupil(string id
pupil(string first_name, string
)last_name, string id

You might also like