Информатика

Автор: Пользователь скрыл имя, 30 Марта 2010 в 10:32, курсовая работа

Описание работы

ЗАДАНИЕ: Задана действительная матрица размера n*m. Построить матрицу той же размерности, если каждый элемент новой матрицы равен сумме элементов в не заштрихованной области.

Содержание

Задание на курсовую работу…………………………………………………2
Замечания руководителя……………………………………………….……..3
Введение…...………………….……………………………………………….5
1. Теоретическая часть…………….………………………………………….6
1.1 Стандартные типы данных……….……………………………….……6
1.2 Массивы в языке программирования Pascal…….…………………….9
1.3 Процедуры и функции…………………………………………….…....10
1.4 Графические возможности языка программирования Pascal………..13
2. Экспериментальная часть………………………………………………….15
2.1 Постановка задачи……………………………………………….……..15
2.2 Алгоритм решения задачи……………………………………….….....15
2.3 Описание диалога с пользователем……………………………….…..25
2.4 Контрольный пример……………………………………………….….26
Заключение…………………………………………………………………….27
Список литературы……………………………………………………………28
Приложение……………………………………………………………………29

Работа содержит 1 файл

Курсяк.doc

— 508.00 Кб (Скачать)

               Bar(33,293,147,437);

               SetColor(7);

               For i:=33 to 147 do

               Line(33,437,i,293);

               {5kvadrat}

               SetColor(1);

               Rectangle (260,290,380,440);

               SetFillStyle(1,9);

               Bar(263,293,377,437);

               SetFillStyle(1,7);

               Bar(263,365,320,437);

               Bar(320,293,377,365);

               {6kvadrat}

               SetColor(1);

               Rectangle (490,290,610,440);

               SetFillStyle(1,9);

               Bar(493,293,607,437);

               SetFillStyle(1,7);

               Bar(493,293,550,365);

               Bar(550,365,607,437);

               TekDeystvie:=1;

      Repeat;

      Ch:=ReadKey;

      Case ch of

           {Knopka Enter}

      #13: Begin

                  Case TekDeystvie of

          1:Begin

                 ClearDevice;

                 If m=n Then

                 Begin

                 SetColor(3);

                 OutTextXY (250,10,'Sposob Vichisleni9');

                 SetColor(11);

                 Line (245,19,400,19);

                 Line (245,7,400,7);

                 Line (245,19,245,7);

                 Line (400,19,400,7);

                 SetColor(2);

                 VyvodmassG (A,'A');

                 SetColor(4);

                 MoveTo(58,35);

                 LineTo(37+40*n,35);

                 Delay(50000);

                 LineTo(37+40*n,35+15);

                 Delay(50000);

                 LineTo(58+20,20+30*m);

                 Delay(50000);

                 LineTo(58,20+30*m);

                 Delay(50000);

                 LineTo(58,35);

                 SetColor(6);

                 Summa1(A,'A');

                 AvB (B,'B');

                 S:=0;

                 K2:=2;

                 SetColor (3);

                 OutTextXY (100,470,'VbIvedite Rezyltat');

                 Delay (50000);

                 Delay (50000);

                 Delay (50000);

                 SetColor (4);

                 OutTextXY (320,470,'Press ENTER to Continue');

                 Delay (50000);

                 Delay (50000);

                 Delay (50000);

                 SetColor (0);

                 OutTextXY (320,470,'Press ENTER to Continue');

                 Delay (50000);

                 Delay (50000);

                 Delay (50000);

                 SetColor (4);

                 OutTextXY (320,470,'Press ENTER to Continue');

                 Readln;

                 Goto M2;

                 End

                 Else

                 Begin

                 ClearDevice;

                 SetColor(4);

                 OutTextXY(130,240,'Chislo Stolbschov Dolzhno biT RAVNO Chisly Strok!!');

                 Delay(50000);

                 Delay(50000);

                 Delay(50000);

                 Delay(50000);

                 Delay(50000);

                 Readln;

                 Goto M2;

              End;

            End;

          2:Begin

                 ClearDevice;

                 If m=n Then

                 Begin

                 SetColor(3);

                 OutTextXY (250,10,'Sposob Vichisleni9');

                 SetColor(11);

                 Line (245,19,400,19);

                 Line (245,7,400,7);

                 Line (245,19,245,7);

                 Line (400,19,400,7);

                 SetColor(2);

                 VyvodmassG (A,'A');

                 SetColor(4);

                 MoveTo(20+40*n,35);

                 LineTo(37+40*n,35);

                 Delay(50000);

                 LineTo(37+40*n,20+30*m);

                 Delay(50000);

                 LineTo(58,20+30*m);

                 Delay(50000);

                 LineTo(58,20+30*m-13);

                 Delay(50000);

                 LineTo(20+40*n,35);

                 SetColor(6);

                 Summa2(A,'A');

                 AvB (B,'B');

                 S:=0;

                 K2:=2;

                 SetColor (3);

                 OutTextXY (100,470,'VbIvedite Rezyltat');

                 Delay (50000);

                 Delay (50000);

                 Delay (50000);

                 SetColor (4);

                 OutTextXY (320,470,'Press ENTER to Continue');

                 Delay (50000);

                 Delay (50000);

                 Delay (50000);

                 SetColor (0);

                 OutTextXY (320,470,'Press ENTER to Continue');

                 Delay (50000);

                 Delay (50000);

                 Delay (50000);

                 SetColor (4);

                 OutTextXY (320,470,'Press ENTER to Continue');

                 Readln;

                 Goto M2;

                 End

                 Else

                 Begin

                 ClearDevice;

                 SetColor(4);

                 OutTextXY(220,240,'Chislo Stolbschov Dolzhno biT RAVNO Chisly Strok!!');

                 Delay(50000);

                 Delay(50000);

                 Delay(50000);

                 Delay(50000);

                 Delay(50000);

                 Readln;

                 Goto M2;

              End;

            End;

          3:Begin

                 ClearDevice;

                 If m=n Then

                 Begin

                 SetColor(3);

                 OutTextXY (250,10,'Sposob Vichisleni9');

                 SetColor(11);

                 Line (245,19,400,19);

                 Line (245,7,400,7);

                 Line (245,19,245,7);

                 Line (400,19,400,7);

                 SetColor(2);

                 VyvodmassG (A,'A');

                 SetColor(6);

                 Summa3(A,'A');

                 AvB (B,'B');

                 S:=0;

                 K2:=2;

                 SetColor (3);

                 OutTextXY (100,470,'VbIvedite Rezyltat');

                 Delay (50000);

                 Delay (50000);

                 Delay (50000);

                 SetColor (4);

                 OutTextXY (320,470,'Press ENTER to Continue');

                 Delay (50000);

                 Delay (50000);

                 Delay (50000);

                 SetColor (0);

                 OutTextXY (320,470,'Press ENTER to Continue');

                 Delay (50000);

                 Delay (50000);

                 Delay (50000);

                 SetColor (4);

                 OutTextXY (320,470,'Press ENTER to Continue');

                 Readln;

                 Goto M2;

                 End

                 Else

                 Begin

                 ClearDevice;

                 SetColor(4);

                 OutTextXY(220,240,'Chislo Stolbschov Dolzhno biT RAVNO Chisly Strok!!');

                 Delay(50000);

                 Delay(50000);

                 Delay(50000);

                 Delay(50000);

                 Delay(50000);

                 Readln;

                 Goto M2;

              End;

            End;

          4:Begin

                 ClearDevice;

                 If m=n Then

                 Begin

                 SetColor(3);

                 OutTextXY (250,10,'Sposob Vichisleni9');

                 SetColor(11);

                 Line (245,19,400,19);

                 Line (245,7,400,7);

                 Line (245,19,245,7);

                 Line (400,19,400,7);

                 SetColor(2);

                 VyvodmassG (A,'A');

                 SetColor(6);

                 Summa4(A,'A');

                 AvB (B,'B');

                 S:=0;

                 K2:=2;

                 SetColor (3);

                 OutTextXY (100,470,'VbIvedite Rezyltat');

                 Delay (50000);

                 Delay (50000);

                 Delay (50000);

                 SetColor (4);

                 OutTextXY (320,470,'Press ENTER to Continue');

                 Delay (50000);

                 Delay (50000);

                 Delay (50000);

                 SetColor (0);

                 OutTextXY (320,470,'Press ENTER to Continue');

                 Delay (50000);

                 Delay (50000);

                 Delay (50000);

                 SetColor (4);

                 OutTextXY (320,470,'Press ENTER to Continue');

Информация о работе Информатика