Program na prevod uhlov zo stupňov na radiány a naopak
Kategória:
Program: Radian.pas
Súbor exe: Radian.exe
Program na prevod uhlov zo stupňov na radiány a naopak. Zaujímavé je grafické spracovanie pomocou systémovej jednotky crt.
{ 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.