Advertisement
Guest User

Untitled

a guest
Mar 6th, 2015
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.34 KB | None | 0 0
  1. {zadavaji se cisla,tak dlouho dokud 0}
  2. program poc;
  3. uses crt;
  4. var c,pl,ps:integer;
  5. begin
  6.     clrscr;
  7.     repeat
  8.     writeln('Zadej cislo');
  9.     readln(c);
  10.     if (c mod 2=0) and (c<>0) then ps:=ps+1;
  11.     if c mod 2<>0 then pl:=pl+1
  12.     until c=0;
  13.     writeln('Pocet sudych: ',ps);
  14.     writeln('Pocet lichych: ',pl);
  15.     readln;
  16. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement