Dastur tarkibidagi qism-dasturlar vazifalarini aniqlang. var m,n:real;
Function Max(a,b:real):real;
begin
if a>b then Max:=a else max:=b;
end;
Function Min(a,b:real):real;
begin
if a>b then Min:=a else Min:=b;
end;
begin
readln(m,n);
Writeln('Max=',max(m,n));
Writeln('Min=',min(m,n));
readln;
end.
8-masala.
Tarkibida formal parametri satriy kattalikni “teskarilovchi” funksiyadan foydalanib, kirtilgan ixtiyoriy so’zni teskari tartibda yozuvchi dastur yarating.
var s:string;
function teskari(t:string):string;
var w:string; D,i:INTEGER;
begin w:=''; D:=LENGTH(T);
FOR I:=d downTo 1 DO
w:=w+t[i];
teskari:=w;
end;
begin
readln(s);
writeln(teskari(s));