{ RADIAN.PAS Copyright (c) Jardo } { Program na prevod uhlov zo stupòov na radiány a naopak. } { Zaujímavé je grafické spracovanie pomocou systémovej jednotky crt.} { } { Datum:10.08.2008 http://www.trsek.com } program radian; uses crt; var a,x:real;b:real; y,z:char; procedure nadpis; begin textbackground(blue); textcolor(white); clrscr; writeln; writeln(' RADIAN 1.0'); writeln; writeln('Program na prevod uhlov.'); writeln; end; procedure okno_prevod; begin nadpis; window(21,12,61,16); {tien okna} textbackground(0); clrscr; window(19,11,59,15); textbackground(7); clrscr; writeln(' ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍ Prevod ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»'); writeln(' º º'); writeln(' º º'); writeln(' º º'); write(' ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ'); end; procedure okno_zadanie; begin window(11,9,71,15); {tien} textbackground(0); clrscr; window(9,8,69,14); textbackground(7); clrscr; end; begin repeat {2} REPEAT {1} { aby mohol stlacit len pismena R,S,r,s } b:=0; okno_prevod; window(1,1,80,25); gotoxy(22,13); textbackground(7); textcolor(red); write(' R'); textcolor(black); write('adi ny-stupne '); textbackground(7);write(' ³ ');textbackground(7); textcolor(red); write(' S'); textcolor(black); write('tupne-radi ny '); repeat until keypressed;y:=readkey; if y='R' then y:='r'; if y='S' then y:='s'; IF y='r' THEN b:=1; IF y='s' THEN b:=1; UNTIL b=1;{1} if y='r' then begin okno_prevod; window(1,1,80,25); gotoxy(22,13); textbackground(green); textcolor(red); write(' R'); textcolor(black); write('adi ny-stupne '); textbackground(7);write(' ³ ');textbackground(7); textcolor(red); write(' S'); textcolor(black); write('tupne-radi ny '); delay(300); {-----koniec vyberu------} nadpis; okno_zadanie; textcolor(white); writeln(' ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ Prevod radi ny-stupne ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»'); writeln(' º º'); writeln(' º º'); writeln(' º º'); writeln(' º º'); writeln(' º º'); write(' ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ'); window(1,1,80,25); gotoxy(12,10); textcolor(0); writeln('Uhol v radi noch:'); gotoxy(12,11); writeln('Uhol v stupåoch:'); gotoxy(12,12); writeln(' ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ'); textcolor(0); gotoxy(30,10); read(x); a:=(x*180)/3.14; gotoxy(29,11); write(a:3:3,'ø'); end; { writeln('Prevod radi ny-stupåe:'); writeln; writeln; write(' Zadaj uhol v radi noch: '); readln(x); writeln; a:=(x*180)/3.14; write(' ',x:2:2,' rad = ',a:3:3,'ø'); end;} if y='s' then begin okno_prevod; window(1,1,80,25); gotoxy(22,13); textbackground(7); textcolor(red); write(' R'); textcolor(black); write('adi ny-stupne '); textbackground(7);write(' ³ ');textbackground(green); textcolor(red); write(' S'); textcolor(black); write('tupne-radi ny '); delay(300); {-----koniec vyberu------} nadpis; okno_zadanie; textcolor(white); writeln(' ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ Prevod stupne-radi ny ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»'); writeln(' º º'); writeln(' º º'); writeln(' º º'); writeln(' º º'); writeln(' º º'); write(' ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ'); window(1,1,80,25); gotoxy(12,10); textcolor(0); writeln('Uhol v stupåoch:'); gotoxy(12,11); writeln('Uhol v radi noch:'); gotoxy(12,12); writeln(' ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ'); textcolor(0); gotoxy(29,10); read(a); x:=(a*3.14)/180; gotoxy(30,11); write(x:2:2,' rad'); end; { writeln('Prevod stupåe-radi ny:'); writeln; writeln; write(' Zadaj uhol v stupåoch: '); readln(a); writeln; x:=(a*3.14)/180; write(' ',a:3:3,'ø = ',x:2:2,' rad'); end;} gotoxy(30,13); write(' opakovaœ? (a/n):'); repeat until keypressed;z:=readkey; if z='N' then z:='n'; until z='n'; {2} textbackground(blue); clrscr; window(21,10,61,16); {tien okna} textbackground(0); clrscr; window(19,9,59,15); textbackground(7); clrscr; writeln(' ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»'); writeln(' º RADIAN v1.0 º'); writeln(' º ----------------------------------- º'); writeln(' º ...just another school program º'); writeln(' º (c) 2006 by Jardo º'); writeln(' º (srobovak@azet.sk) º'); write(' ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ'); end.