Алгоритмический язык Pascal |
type M= Set of B; type M= Set of 'A'..'D'; var MS : M; var C : Set of 0..7; ['A', 'C'] [0, 2, 7] [3, 7, 11..14]. var P : 1..3;- 1, 2, 3. var T : Set of 1..3;: [ ] [1,2] [1] [1,3] [2] [2,3] [3] [1,2,3] ['A','B'] + ['A','D'] ['A','B','D'] ['A'] * ['A','B','C'] ['A'] ['A','B','C'] - ['A','B'] ['C']. ['A','B'] = ['A','C'] FALSE ['A','B'] <> ['A','C'] TRUE ['B'] <= ['B','C'] TRUE ['C','D'] >= ['A'] FALSE. A in ['A', 'B'] TRUE, 2 in [1, 3, 6] FALSE.. . , ['A','B','C','D'] 1 1 1 1.: ['A','B','D'] 1 1 0 1 ['B','C'] 0 1 1 0 ['D'] 0 0 0 1 const seLit: Set of 'A'..'D'= [];
Program Lotto; var nb, k: Set of 1..36; kol, l, i, n: Integer; begin Randomize; WriteLn(' kol'); ReadLn(kol); nb:=[1..36]; for i:=1 to kol do begin k:=[]; for l:=1 to 5 do begin repeat n:=Random(36) until (n in nb) and not (n in k); k:=k+[n]; Write(n:4) end; WriteLn end end. —одержание”чебник по ¤зыку Pascal Ћабораторные работы по программированию —правочник |
Нет комментариев. Оставить комментарий: |