Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/03/2009, 20:24
pankas
 
Fecha de Ingreso: marzo-2009
Mensajes: 5
Antigüedad: 16 años
Puntos: 0
Pascal, condiciones de un WHILE

Necesito una estructura de WHILE que evalúe tres condiciones y que salga del loop cuando alguna de esas tres condiciones sea cierta, a grosso modo el algoritmo es asi...

________________________________________________
program temperaturas ;
//algoritmo y funciones para convertir temperaturas
var
tipo_temp : shortstring;
grados, resp1, resp2 : real ;

//funciones
function celsius_farenheit (V:real) : real ;
begin
celsius_farenheit:= 9/5*V+32
end;
function celsius_kelvin (V:real) : real ;
begin
celsius_kelvin:=273.15+V
end;
function farenheit_celsius (V:real):real;
begin
farenheit_celsius:=5/9*(V-32)
end;
function kelvin_celsius (V:real): real;
begin
kelvin_celsius:=V-273.15
end;
//instrucciones
begin
grados:= 0;
resp1:= 0;
resp2:= 0;
writeln('Indique el tipo de temperatura a convertir');
readln(tipo_temp);

//aca esta el problema

while tipo_temp<>'celsius' or tipo_temp <> 'farenheit' or tipo_temp <> 'kelvin' do
writeln ('ERROR, INGRESE UN TIPO DE TEMPERATURA VALIDO (FARENHEIT, CELSIUS O KELVIN)');
readln (tipo_temp);
end.

writeln('Ingrese la cantidad de grados a convertir');
readln(grados);

...continuan las demas instrucciones...
__________________________________________________ ______

Cuando voy a compilar me da un error y no entiendo cual es el problema.