Program PRACT9; Uses CRT; Var a,b,c,d,e,f: byte; Count: Word; Begin ClrScr; Count := 0; For a := 1 to 9 do Begin If (a in [2,4,6,8]) then Continue; For b := 1 to 9 do Begin If (b in [2,4,6,8,a]) then Continue; For c := 1 to 9 do Begin If (c in [2,4,6,8,a,b]) then Continue; For d := 2 to 8 do Begin If (d in [3,5,7]) then Continue; If (c = 7) and (d = 8) then Continue; For e := 2 to 8 do Begin If (e in [3,5,7]) then Continue; For f := 2 to 8 do Begin If (f in [3,5,7]) then Continue; Inc(Count); End; End; End; End; End; End; Writeln('Счастливых билетов: ',Count); ReadKey; End.