PDA

Ver la versión completa : Lo que es estar al pedo



muny
03/09/2009, 22:29
Abro este th para q muesrten ese programita q hicieron cuando estaban al recontra pedo (como yo ahora), puede ser en cualkir lenguaje o formato. Solo pongan q se supone q hace, y el codigo para q todoslo podamos plag.... digo ver :D

va el mio

Lenguaje: Pascal
Q hace: ingrsas un numero "a" y luego un numero "b" y te da el listado de multiplos de" a" hasta legar a "b"



Program MyN;
USES crt;
VAR
M, N, X, V, S, R, A: REAL;
BAN, Z, CC: Byte;

Begin
clrscr;
Writeln ('Comenzar programa. (1)');
Writeln ('Cancelar ejecuci¢n. (0)');
Writeln ('C¢digos de error. (2)');
Readln (Z);
While Z = 2 do
Begin
clrscr;
Writeln (' ');
Writeln ('Ingrese el c¢digo del error:');
Write ('Ax');
Read (CC);
If CC = 1 then
Begin
Writeln (' ');
Write (' Este error se debe al ingreso de opciones incorrectas, es decir, el programa le indica que elija');
Write ('entre 3 opciones (del "0" al "2") y usted escribre (por ejemplo) "4"');
Writeln (' ');
Writeln (' ');
Writeln (' Seguir con el programa (1), cancelar ejecuci¢n (0), nueva consulta (2)');
Readln (Z);
end
else
Begin
Writeln (' ');
Write (' Este error se debe al ingreso de un "0" ¢ un n£mero negativo (siendo el conjunto positivo)');
Write ('al momento de ingresar el n£mero a obtener m£ltiplos. Lo que provocar¡a un ciclo infinito.');
Writeln (' ');
Writeln (' ');
Writeln (' Seguir con el programa (1), cancelar ejecuci¢n (0), nueva consulta (2)');
Readln (Z);
end;
end;
clrscr;
While (Z>2) or (Z<0) do
Begin
clrscr;
Writeln (' ');
Writeln ('Error.');
Writeln (' ');
Writeln ('C¢digo de error: Ax1');
Writeln (' ');
Writeln ('Vuelva a seleccionar la opci¢n.');
Writeln ('Iniciar (1), Terminar (0)');
Readln (Z);
end;
While Z=1 do
Begin
clrscr;
Writeln (' ');
Writeln ('Ingresar el conjunto de n£meros.');
Readln (N);
Writeln ('Ingresar el n£mero.');
Readln (M);
V:= 0;
X:= 1;
S:= 0;
If M <= 0 then
Begin
clrscr;
Writeln (' ');
Writeln ('Previniendo error catastr¢fico, ciclo terminado.');
Writeln ('C¢digo de error: Ax2');
X:=0;
M:= N+25;
end;
If M < N then
Begin
clrscr;
Writeln (' ');
Writeln ('Conjunto de n£meros: ', N :0:0);
Writeln (' ');
Writeln ('N£mero a obtener m£ltiplos: ', M :0:0);
Writeln (' ');
Writeln (' ');
Writeln ('M£ltiplos:');
Writeln (' ');
If (N = 0) or (M = 0) or (M >= N) then
Ban := 1;
end;
While X=1 do
Begin
V:=V+1;
R:=M*V;
If R <= N then
Begin
Write (R :0:0,' ');
S:=S+1;
end
Else
Begin
Writeln (' ');
Writeln (' ');
Writeln ('El n£mero especificado supera al conjunto de n£meros especificado.');
Writeln ('Ciclo terminado.');
X:=0;
end;
end;
If BAN = 1 then
begin
Writeln (' ');
Writeln ('Cantidad de m£ltiplos obtenidos: ', S :0:0);
Writeln (' ');
end;
Writeln(' ');
Writeln ('¨Comenzar otro ciclo? (1)');
Writeln ('Terminar programa. (0)');
Readln (Z);
While (Z>1) or (Z<0) do
Begin
clrscr;
Writeln (' ');
Writeln ('Error.');
Writeln ('C¢digo de error: Ax1');
Writeln (' ');
Writeln ('Vuelva a seleccionar la opci¢n.');
Writeln ('Iniciar (1), Terminar (0)');
Readln (Z);
end;
end;
End.

l2neitan
03/09/2009, 22:45
Se pueden poner programas hack? xD

muny
03/09/2009, 23:33
preguntale a god, x mi, postia el programa q kieras