1)uses crt; var x,a,b,c,i: integer; begin cls; write('введите число: '); readln(x); a: = x div 100; b: = (x - a*100) div 10; c: = (x - a*100 - b*10); if (a=b) or (a=c) or (b=c) then writeln('есть одинаковые цифры') else writeln('одинаковых цифр нет'); end.2)uses crt; var x: real; begin cls; write('сумма покупки: '); readln(x); if x> 1000 then x: =x-(x*0.1); writeln('стоимость с учётом возможной скидки ',x); end.
uses Crt; const n=10; type Mas=array [1..n] of integer; var A: Mas; i, temp, MinInd, MaxInd, Max, Min: integer; begin ClrScr; Randomize; for i:=1 to n do begin A[i]:=10+random(90); Write (A[i]:5); end; WriteLn; Max:=A[1]; MaxInd:=1; Min:=A[1]; MinInd:=1; for i:=2 to n do begin if A[i]<Min then begin Min:=A[i]; MinInd:=i; end else if A[i]>Max then begin Max:=A[i]; MaxInd:=i; end; end; temp:=A[MaxInd]; A[MaxInd]:=A[MinInd]; A[MinInd]:=temp; WriteLn;WriteLn; for i:=1 to n do Write (A[i]:5); WriteLn; ReadLn; end.