program programa1;
var max,min,a,b,c,f:real;
i:integer;
begin
writeln ('ingrese el primer valor');
readln (a);
c:=0;
max:=a;
min:=a;
c:=c+1;
f:=f+1;
for i:=1 to 5 do
begin
writeln ('ingrese otro valor para saber si es maximo o minimo');
readln (B);
if b>max then
begin
max:=b;
c:=c+1;
end
else
if b<min then
begin
min:=b;
f:=f+1;
end;
end;
[color=red]end;[/color] ahora end
writeln ('el valor maxaimo es', max);
writeln ('la posicion del valor maximo es', c);
writeln ('el valor minimo es', min);
writeln ('la posicion del valor minimo es', f);
readln (a);
end.