Ответы на вопрос:
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.
Популярно: Информатика
-
ssss1320.06.2021 08:40
-
UskovaV9906.11.2022 21:26
-
Nastykissa11.11.2021 04:32
-
mariiiiii22208.02.2023 05:58
-
hdl715.06.2020 20:18
-
серго22030.05.2022 14:02
-
Anvar66612.04.2021 11:45
-
erasildamir02.01.2021 10:29
-
bekovmusa07p0c1pn02.04.2020 14:32
-
hadisvv08.11.2020 02:57