Mira mi proble es que la variable "Bim", no la lee, y solo lee el primer Bim queria ver si alguien sabe por que no corre, por que no me marca errores, y pues yo no encuentro que hacer.
program menu;
uses crt;
var raiz,BIM,acumulador,num,nes,cant,res, suma,calificacion,mayor,i,n,y,opc,opcion,a,b,c,d,x:integer;
prom,r:real;
par,nprimo:boolean;
q:byte;
nombre:string;
begin
clrscr;
for i:= 1 to 10 do
textcolor(i);gotoxy(25,5);writeln('M E N U D E E L E C C I O N');
GOTOXY(23,8);WRITELN('1.-PROGRAMA DEL PRIMER PARCIAL');
gotoxy(23,9);writeln('2.-PROGRAMAS DEL SEGUNDO PARCIAL');
GOTOXY(23,10);WRITELN('3.-PROGRAMAS DEL SIGUIENTE PARCIAL');
GOTOXY(23,11);WRITELN('4.-SALIDA');
gotoxy(23,15);writeln('Escribe la opcion que deseas');
readln(BIM);
if BIM= 1 THEN
BEGIN
CLRSCR;
GOTOXY(25,5);WRITELN('PROGRAMA DEL PRIMER PARCIAL');
GOTOXY(23,8);WRITELN('1.-¨QUE ES TURBO PASCAL?');
gotoxy(23,9);writeln('2.-GOTOXY');
gotoxy(23,10);writeln('3.-readln');
writeln('Escribe la opcion que deseas');
readln(opc);
if opc=1 then
begin
clrscr;
writeln('lenguaje de alto nivel estructurado y tiene como objetivo la esctructuras basicas de programacion');
readln;
end;
if opc=2 then
begin
clrscr;
writeln('Situa el cursor en la posicion de coordenadas(xy),donde x son las colunnas, Y representa las filas');
readln;
end;
if opc=3 then
begin
clrscr;
writeln('READLN:Es una estructura estandar que nos permite imprimir datos o con la ayuda de las comillas nos permite enviar mensajes fijos');
READLN;
end;
if BIM = 2 then
begin
clrscr;
gotoxy(25,5);writeln('M E N U DE P R O G R A M A S D E L P R I M E R P A R C I A L');
GOTOXY(23,9);WRITELN('1.-El mayor de cuatro numeros');
gotoxy(23,10);writeln('2.-El menor de cuatro numeros');
gotoxy(23,11);writeln('3.-Los primeros 50 numeros pares');
gotoxy(23,12);writeln('4.-Los primeros 50 numeros impares');
gotoxy(23,13);writeln('5.-Bienvenido');
gotoxy(23,14);writeln('6.-Bienvenida en desplazamiento');
gotoxy(23,15);writeln('7.-La suma de 2 numeros cuadrados');
gotoxy(23,16);writeln('8.-El promedio de 30 calificaciones');
gotoxy(23,18);writeln('Escribe el numero de la opcion que desea');
readln(opc);
if opc=1 then
begin
clrscr;
writeln('Dame cuatro valores,para ver cual es el mayor:');
readln(a,b,c,d);
if(a>=b) and (a>=c) and (a>=d) then
mayor:=a;
if (b>=a) and (b>=c) and (b>=d) then
mayor:=b;
if(c>=a) and (c>=b) and (c>=d) then
mayor:=c;
if(d>=a) and (d>=b) and (d>=c) then
mayor:=a;
end;
if opc=2 then
begin
clrscr;
writeln('Dame cuatro valores,para ver cual es el menor:');
readln(a,b,c,d);
if(a<=b) and (a<=c) and (a<=d) then
mayor:=a;
if (b<=a) and (b<=c) and (b<=d) then
mayor:=b;
if(c<=a) and (c<=b) and (c<=d) then
mayor:=c;
if(d<=a) and (d<=b) and (d<=c) then
mayor:=a;
writeln('El numero menor es:',mayor);
readln;
end;
if opc=3 then
begin
clrscr;
writeln('Los primeros 50 numeros pares son:');
a:=0;
for a:= 1 to 100 do
if a mod 2=0 then
write(a,' ');
readln;
end;
if opc= 4 then
begin
clrscr;
writeln('Los primeros 50 numeros impares son');
a:=0;
for a:=1 to 100 do
if a mod 2=1 then
write(a,' ');
readln;
end;
if opc= 5 then
begin
clrscr;
gotoxy(10,10);writeln('Escrine tu nombre...');
readln(nombre);
clrscr;gotoxy(15,12);writeln('BIENVENIDO A PASCAL', NOMBRE);
READLN;
END;
IF OPC= 6 THEN
BEGIN
CLRSCR;
GOTOXY(10,10);WRITELN('Escribe tu nombre...');
readln(nombre);
clrscr;
for i := 1 to 50 do
begin
clrscr;
textcolor(i);gotoxy(15,i);writeln('!!!!Hola!!!!Bienvenido a Pascal ', nombre);
delay(100)
end;
readln;
end;
if opc=8 then
begin
clrscr;
acumulador:=0;
writeln('Dame 30 calificaciones');
for i:=1 to 30 do
begin
writeln('calificacion',i);
readln(calificacion);
acumulador:=acumulador + calificacion;
end;
writeln('El promedio es..',acumulador/i:5:2);
readln;
end;
if opc= 7 then
begin
clrscr;
writeln('numero uno:');read(a);
writeln('numero dos:');read(B);
writeln('La suma de los cuadrados', sqr(a) + sqr(b));
readln;
end;
if opc= 9 then
exit
end;
if BIM = 2 THEN
begin
clrscr;
gotoxy(23,5);writeln('M E N U CON E S T R U C T U R A FOR');
gotoxy(23,9);writeln('1.-TABLAS DE MULTIPLICAR');
GOTOXY(23,10);WRITELN('2.-SUMA DE CUADRADOS');
gotoxy(23,11);writeln('3.-10 TABLAS DE MULTIPLICAR');
GOTOXY(23,11);WRITELN('4.-NUMEROS PERFECTOS');
GOTOXY(23,12);WRITELN('5.-NUMEROS PRIMOS');
GOTOXY(23,13);WRITELN('6.-NUMEROS PARES O IMPARES');
GOTOXY(23,14);WRITELN('7.-CAJERO');
GOTOXY(23,15);WRITELN('8.-SALIR');
WRITELN('ELIGE LA OPCION QUE QUISIERAS:');
gotoxy(23,16);
readln(opcion);
IF opcion =1 THEN
BEGIN
CLRSCR;
WRITELN('ASIGANME UN VALOR:');
READLN(A);
FOR I:= 1 TO 10 DO
begin
Res:=a * i;
writeln(a,'x',i,'=',Res,' ');
delay(200);
readln;
end;
If opcion=2 then
clrscr;
writeln('dame un valor');
readln(b);
for b:=1 to b do
begin
r:=r + (1/b);
writeln('quebrados',b,'es =',r:5:2);
end;
readln;
end;
readln;
end;
if opcion=3 then
begin
clrscr;
writeln('TABLITAS');
READLN;
FOR A:=1 TO 10 DO
FOR B:=1 TO 10 DO
BEGIN
R:=A*B;
WRITELN(A,'*',B,'=',R);
END;
READLN;
END;
IF opcion =4 THEN
BEGIN
CLRSCR;
writeln('Dame 5 numeros para saber si son perfectos');
acumulador:=0;
for x:= 1 to 5 do
begin
readln(n);
for y:= 1 to n-1 do
begin
if n mod y= 0 then
acumulador:=acumulador + y;
if r= n then writeln(n,'es perfecto');
res:=0;
readln;
end;
READLN;
end;
if opcion =5 then
begin
clrscr;
repeat
writeln('dame 5 numeros enteros para saber si es primo:');
read(a);
until a> 1;
par:= a mod 2=0;
if a= 2 then
write('el numero 2 es primo,es el unico numero par que lo es.');
if par then
write('todo numero para no es primo,excepto el 2.');
begin
raiz:= round(sqrt(a));
for q:= raiz to (a-1) do
begin
if (num mod 1)=0 then
nes:= 0;
end;
if nes= 0 then
write(a,'no es numero primo')
else
write(a,'es un numero primo');
readln;
end;
if opcion= 7 then
begin
clrscr;
writeln('CAJERITO');
readln;
writeln('Dame la cantidad que debe');
readln(A);
Writeln('Dame la cantidad con la que paga');
res:=0;
readln(B);
res:=A-B;
writeln('debe la cantidad:',res);
writeln('su cambio es de');
if res>50 then
begin
acumulador:=a div 50;
writeln(acumulador,'de 50 pesos');
end;
if res>=20 then
begin
acumulador:=res div 20;
writeln(acumulador,'de 20 pesos');
res:=res-(acumulador*20);
end;
if res>=10 then
begin
acumulador:=res div 10;
writeln(acumulador,'de 10 pesos');
res:=res-(acumulador*10);
end;
if res>=5 then
begin
acumulador:=res div 5;
writeln(acumulador,'de 5 pesos');
res:=res-(acumulador*5);
end;
if res>=2 then
begin
acumulador:=res div 2;
writeln(acumulador,'de 2 pesos');
end;
if res>=1 then
begin
acumulador:=res div 1;
writeln(acumulador,'de 1 peso');
res:=res-(acumulador*1);
end;
readln;
end;
if opcion = 6 then
begin
clrscr;
writeln('Dame UN numeros para saber si es pares o impar');
readln(n);
if n mod 2 = 0 then writeln('no es par')
else
writeln('es par');
readln;
end;
readln;
end;
if BIM= 4 THEN
writeln('adios!');
readln;
EXIT
END;
END;
END.