Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Program Vremya;
- var h,m,s,z:integer;
- g:real;
- begin
- write('Vvedite vremya v formate h m s: ');
- repeat
- readln(h,m,s);
- if ((h<0)or(h>23))or((m<0)or(m>59))or((s<0)or(s>59)) then
- write('Vvedeno ne korrectnoe vremya, povtorite vvod: ');
- until (((h>0)and(h<23))or((m>0)and(m<59))or((s>0)and(s<59)));
- if h>11 then
- h:=h-12;
- g:=(((s/60)+m)/60)+h;
- g:=g*30;
- writeln('ugol mejdu strelkoy nachala sutok i zadannoy: ',g:0:2,' gradusov');
- read;
- End.
RAW Paste Data