martes, 28 de febrero de 2012

tablas de multiplicar

program operacionestab;
uses crt;
var op:char;
 Procedure tabl;
          var a,b,n:integer;
       begin
 clrscr;
       textmode(lo(lastmode)+font8x8);
       writeln('');
       textcolor(red);
       write('Ingresa el n£mero de la tabla que quieras saber :');
       readln(a);
        textmode(lo(lastmode)+font8x8);
       writeln;
       textcolor(white-green);
       for n:=1 to 10 do
       begin
            b:=a*n;
            writeln(a,'x',n,'=',b );
       end;
       readln;
end;
begin
     repeat
      writeln;
       textmode(lo(lastmode)+font8x8);
       writeln('');
       textcolor(green);
      writeln('___ Programa de Tablas de Multiplicar ___ ');
      writeln;
      textmode(lo(lastmode)+font8x8);
       writeln('');
       textcolor(yellow);
     writeln('1)entrar');
      textmode(lo(lastmode)+font8x8);
      writeln;
      textcolor(white-green);
     writeln('2)salir');
     writeln;
     textcolor(red);
     readln(op);
     case op of
     '1':tabl;
     end;
     until op ='2';
end.

No hay comentarios:

Publicar un comentario