Попробуй Program PascalGuru; var s:string; f,t:text; function preobr(s:string):string;var i,j,p,n,sered:integer; gl,zp,slovo:string; m:array [1..80] of string;beginzp:='!?*,.'; gl:='аоуыэяеёюи'; p:=pos(' ',s); i:=0; repeat inc(i); slovo:=copy(s,1,p-1); m[i]:=slovo; delete(s,1,p); p:=pos(' ',s); until p=0; n:=i+1; m[n]:=s; for i:=1 to n do begin s:=m[i]; if pos(s[length(s)],zp)<>0 then p:=length(s)-1 else p:=length(s); sered:=(p div 2)+1; if (not odd(p)) or (p<3) then continue; if pos(s[1],gl)=0 then continue; if pos(s[sered],gl)=0 then continue; if pos(s[p],gl)=0 then continue; s[1]:=UpCase(s[1]); s[sered]:=UpCase(s[sered]); s[p]:=UpCase(s[p]); m[i]:=s+'('+s[1]+','+s[sered]+','+s[p]+')'; end; s:=''; for i:=1 to n do s:=s+m[i]+' '; preobr:=s;end; beginassign(f,'input.txt'); reset(f);assign(t,'output.txt'); rewrite(t); while not eof(f) do begin readln(f,s); writeln(t, preobr(s) ); end; writeln('Файл успешно записан...'); close(f);close(t);readln;end.
1)program fagasg; var x1,y1,r: real; begin Writeln('Введите х1'); readln(x1); Writeln('Введите у1'); readln(y1); r:=sqrt(x1*x1+y1*y1); Writeln('Расстояние от х1 до у1=',r); end. 2)Program fsgasghfd; var c,s: real; a,b: integer; begin Writeln('Введите первое целое число'); readln(a); Writeln('Введите второе целое число'); readln(b); Writeln('Введите дробное число'); readln(c); If ((a>0) and (b>0) and (c>0)) or ((a<0) and (b<0) and (c<0)) then s:=a+b+c else writeln('Знаки разные'); If ((a>0) and (b>0) and (c>0)) or ((a<0) and (b<0) and (c<0)) then Writeln('Сумма чисел:',s); end. 3)Program wrqrwqr; var A: Array[1..100] of integer; B: Array[1..100] of integer; C: Array[1..100] of integer; s,i,h,g: integer; begin h:=0; g:=0; Writeln('введите размерность массива'); readln(s); Writeln('Вводится первый массив'); For i:=1 to s do begin Writeln('Введите элемент массива №',i); readln(A[i]); end; Writeln('Вводится второй массив'); For i:=1 to s do begin Writeln('Введите элемент массива №',i); readln(B[i]); end; For i:=1 to s do begin If A[i]>B[i] then C[i]:=A[i] else C[i]:=B[i]; If C[i] mod 2=1 then h:=h+1; If C[i] mod 2=0 then g:=g+1; end; Writeln('Количество нечётных элементов в массиве:',h); Writeln('Количество чётных элементов в массиве:',g); end.
b = AF16 = 10х4096 + 15х256 + 1х16 + 1х6 = 44822
a+b = 44947
Что бы понять самому что к чему, читай это "Основы систем счисления" на Habrahabr