Condición If Anidados
Condicion If Anidados
Condicion Si ... Entonces (If ...Then)
Sino (Else)
CÓDIGO
Program Condicion_if_Anidados; Uses Crt; Var x,y:integer; begin ClrScr; writeln('Ingresa un numero que sea el 1, 2 o 3'); readln(x); writeln; if x=1 then begin writeln('Ingresastes el numero UNO'); end else begin if x=2 then begin writeln('Ingresastes el numero DOS'); end else begin if x=3 then begin writeln('Ingresastes el numero TRES'); end else begin writeln('Ingresastes otro numero diferente'); end; end; end; writeln; write('Presiona Enter p/Salir'); readln; end.
No hay comentarios:
Publicar un comentario
Inicio
Suscribirse a:
Entradas (Atom)
No hay comentarios:
Publicar un comentario