Mistři v programování na #hovnokod

Jiné #868

Pascal: Efektivna tvorba menu s moznostou posunu sipkami. Cely zdrojak na: http://cyberqwert.wz.cz/Matematika.PAS

    key:=readkey;
    case ord(key) of
	75,72:
	begin
            clrscr;
            if i>1 then dec(i);
            case i of
		1:
                begin
                    textcolor(green);
                    writeln('Pytagorova veta');
                    textcolor(white);
                    writeln('Kruh a kruznica');
                    writeln('Telesa');
                    writeln('....................');
                    writeln('Koniec');
                end;
            2:
                begin
                    writeln('Pytagorova veta');
                    textcolor(green);
                    writeln('Kruh a kruznica');
                    textcolor(white);
                    writeln('Telesa');
                    writeln('....................');
                    writeln('Koniec');
                end;
            3:
                begin
                    writeln('Pytagorova veta');
                    writeln('Kruh a kruznica');
                    textcolor(green);
                    writeln('Telesa');
                    textcolor(white);
                    writeln('....................');
                    writeln('Koniec');
                end;
            4:
                begin
                    writeln('Pytagorova veta');
                    writeln('Kruh a kruznica');
                    writeln('Telesa');
                    writeln('....................');
                    textcolor(green);
                    writeln('Koniec');
                    textcolor(white);
                end;
            end;
		end; {Sipka hore}
                           // pokracuje prakticky to iste, len pre sipku nahor

Adrián Novosád,