© Сайт про Урок @""ІНФОРМАТИКА""@ WMmail.ru - сервис почтовых рассылок
   
  pc201010
  Алгоритм автоматизованої обробки даних в
 

         1. Мета роботи: побудова графічних моделей алгоритмів обробки цифрових даних.

         2. Матеріальне забезпечення:

2.1. Клас ПЕОМ……………………………………………………….IBM PC/AT 486

2.2. Програмне забезпечення………………………………………TURBO PASCAL 7.0

         3. Завдання.

Варіант 7

1) Z= -3Y+2;

при Y = 7;

2) Z=6x+4;

при 0Y5, ∆х=0.2 ;

3)  Z=2xY-6Y-2Y+3,
при 2х:8, ∆х=0.2,
при
-7Y4,Y=0.1 ;

4)  {X,} =(7,9,2,3,5,7,2,7,3,5,7,2,7,8,9)

5)    6  6  1
7  3  1
4  2  1

5  7  9

          6  6  1
          7  3  1
          4  2  1
          5  7  9
          5  7  9

 

 

         4. Порядок виконання роботи.

4.1. Складаємо лінійний алгоритм обробки даних.

  Program Lab1;                                                                

        const Y=7;                                                           

Var                                                                          

         z:integer;                                                          

Begin                                                                         

     z:=-3*Y+2;                                                              

     writeln('Znachennja Z=',Z);                                             

     End.                                                                     

                                                                             

        

4.2. Складаємо циклічний алгоритм обробки даних.

Program Lab2;                                                                

        label 1,2;                                                           

        const Xi=0;                                                          

Var                                                                          

   X,Z:real;                                                                  

Begin                                                                        

     X:=Xi;                                                                  

          2:Begin                                                             

                 Z:=6*X+4;                                                   

          writeln ('X=',X:2:1,'  ','Z=',Z:2:1);                              

                  if X>=5 then goto 1 else                                     

          X:=X+0.2;                                                          

                  goto 2;                                                   

          1:end;                                                             

                readln;                                                      

     End.                                                                    

 

 

 

4.3. Складаємо мультициклічний алгоритм обробки даних.

 

Program Lab3;                                                                 

        label 1,2;                                                           

        const Xi=2;Yi=-7;                                                    

Var                                                                           

   X,Y,Z:real;                                                               

Begin                                                                        

     X:=Xi;                                                                   

     Y:=Yi;                                                                  

           2:Z:=2*X*Y-6*Y-2*Y+3;                                             

           writeln ('X=',X:2:1,'Y=',Y:2:1,'  ','Z=',Z:2:1);                  

           if Y>=4 then goto 1 else                                          

           Y:=Y+0.1;                                                         

           if X>=8 then goto 1 else                                          

           X:=X+0.2;                                                          

           goto 2;                                                           

           1:readln;                                                         

End.                                                                          

 

 

 

4.4. Складаємо алгоритм вводу/виводу одномірного масиву даних.

 

  Program Lab4;                                                                

Var                                                                          

   X:array[1..15] of integer;                                                 

   i:integer;                                                               

Begin                                                                        

     for i:=1 to 15 do                                                        

     Begin                                                                   

     write ('X[',i,']=');                                                    

     readln (X[i]);                                                           

     end;                                                                    

     for i:=1 to 15 do                                                       

     Begin                                                                   

     write ('X[',i,']=',X[i]);                                              

     end;                                                                    

     readln;                                                                 

End.                                                                          

 

 

 

4.5. Складаємо алгоритм вводу/виводу двомірного масиву даних.

 

Program Lab5;                                                                

Var                                                                           

        X:array[1..15] of real;                                              

        i,j:integer;                                                        

Begin                                                                        

        for i:=1 to 9 do                                                     

        Begin                                                                

        for j:=1 to 3 do                                                    

        Begin                                                                 

        write('X[',i,',',j,']=');                                            

        readln (X[i,j]);                                                     

        end;                                                                  

        end;                                                                 

        for i:=1 to 9 do                                                     

        Begin                                                                 

        for j:=1 to 3 do                                                     

        Begin                                                                

        write('X[',i,',',j,']='X[i,j]);                                      

        end;                                                                 

        writeln;                                                             

        end;                                                                  ­

        readln;                                                               

End.                                                                          

 

         5. Висновок: на даній лабораторній роботі я навчився будувати алгоритми обробки цифрових даних.

 
  Сегодня были уже 1 посетителей  
 
Лаптєв Олег Володимирович © 2010 pc201010.ru.gg
Этот сайт был создан бесплатно с помощью homepage-konstruktor.ru. Хотите тоже свой сайт?
Зарегистрироваться бесплатно