VitalyD

Задание №25. Вариант 8

May 25th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.41 KB | None | 0 0
  1. // Задание №25. Вариант 8
  2.  
  3.  
  4.  
  5. const n = 5;
  6.  
  7. var
  8.     a: array [1..n] of integer;
  9.     i, j, min: integer;
  10. begin
  11.  
  12.  
  13.     for i := 1 to n do
  14.         readln(a[i]);
  15.        
  16.     min := 1001;
  17.     for i := 1 to n do
  18.         if ((a[i] > 0) and (a[i] mod 2 = 0) and (a[i] < min)) then min := a[i];
  19.    
  20.     if (min < 1001) then Writeln (min)
  21.     else Writeln (':(');  
  22.        
  23.  
  24.     //...
  25. end.
Advertisement
Add Comment
Please, Sign In to add comment