Есть ответ 👍

понять, как это сделать.

212
425
Посмотреть ответы 1

Ответы на вопрос:


Program hardzadacha; var 1,2,3,4,5,6,7,8,9,0: array [0..5] of integer;         a,i,x: integer; begin writeln('введите целое число :   '); read(a); for i: =1 to 5 do begin if a mod 10 =0 then 0[i]: =0[i]+1; if a mod 10 =1 then 1[i]: =1[i]+1; if a mod 10 =2 then 2[i]: =2[i]+1; if a mod 10 =3 then 3[i]: =3[i]+1; if a mod 10 =4 then 4[i]: =4[i]+1; if a mod 10 =5 then 5[i]: =5[i]+1; if a mod 10 =6 then 6[i]: =6[i]+1; if a mod 10 =7 then 7[i]: =7[i]+1; if a mod 10 =8 then 8[i]: =8[i]+1; if a mod 10 =9 then 9[i]: =9[i]+1; a: =a mod 10; end; for i: =2 to  5 do begin if 0[i]+0[i-1]> 1 then x: =1;   if 1[i]+1[i-1]> 1 then x: =1;   if 2[i]+2[i-1]> 1 then x: =1;   if 3[i]+3[i-1]> 1 then x: =1;   if 4[i]+4[i-1]> 1 then x: =1;   if 5[i]+5[i-1]> 1 then x: =1;   if 6[i]+6[i-1]> 1 then x: =1;   if 7[i]+7[i-1]> 1 then x: =1;   if 8[i]+8[i-1]> 1 then x: =1;   if 9[i]+9[i-1]> 1 then x: =1;   end; if x=1 then writeln('есть повторяющие цифры') else writeln('нет  повторяющихся  цифр'); end.

Популярно: Информатика