2
askisi7_sel97
(14.11.2011 11:11)
0
program askisi_7_sel_97; var ilk1,ilk2,diaf:integer; onoma1,onoma2:string[15]; begin writeln('dose to onoma sou :'); readln(onoma1); writeln('dose tin ilikia sou :'); readln(ilk1); writeln('dose to onoma sou :'); read(onoma2); writeln('dose tin ilikia sou :'); read(ilk2); if ilk1>ilk2 then writeln('Dedomena :',ilk1,' ',ilk2) else writeln('Dedomena :',ilk2,' ',ilk1); writeln('Apotelesmata:'); if ilk1>ilk2 then begin writeln('O ',onoma1,' einai ',ilk1,' eton'); writeln('O ',onoma2,' einai ',ilk2,' eton'); end else begin writeln('O ',onoma2,' einai ',ilk2,' eton'); writeln('O ',onoma1,' einai ',ilk1,' eton'); end; if ilk1=ilk2 then writeln('O ',onoma1,' kai O ',onoma2,' exoun idia ilikia') else begin
if ilk1>ilk2 then begin diaf:=ilk1-ilk2; writeln('O ',onoma1,' einai ',diaf,' eti megaliteros apo to ',onoma2) end else begin diaf:=ilk2-ilk1; writeln('O ',onoma2,' einai ',diaf,' eti megaliteros apo to ',onoma1); end end; end.
|