Program terma; Uses wincrt; Type Alphabet = Array [A..Z]; Var alpha,alphaf:Alphabet; codef,num,ch1,ch,ch2:string; code,code1,none,e,ch3,j,alpha1:integer; Begin Repeat Writeln('donner ch'); Readln(ch); For i := 1 to lengh(ch) do If ord(ch[i]) in [ 65 .. 90 ] Then ch1:= ch Else if ord(ch[i]) = 32 Then ch2 := ch Else ch3:= 0; Until (length(ch) in [1 ..9]) And (ch3>0) and (Majus(ch[i])= ch[i] ; Repeat Writeln('donner entiers'); Readln(num); Val(num,none,e) Until (e=0) and (length(num)= length(ch)) For j := 1 to length(ch) do alpha := ch[j]; If ord(ch[j]) = 32 Then Alpha1[j] = '' Else alpha1 := ord(alpha); code[j] := alpha1 + num[j]; If code > 26 then code1[j] := code[j] - 26 Else code1:= code; alphaf := code1; codef := chr(alphaf[j]); Writeln('Votre code est', codef); End.