SHARE
TWEET

Untitled

a guest Jun 7th, 2017 124 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program x;
  2. var s,N,a,i,k,g:integer;
  3. begin
  4. k:=0;
  5. s:=0;
  6. g:=0;
  7. readln(a);
  8. while a<> 0 do
  9. begin
  10. IF ( a mod 8=0) then
  11. begin
  12. g:=g+1;  
  13. s:=a+s;
  14. k:=k+1;
  15. end;
  16. readln(a);
  17. end;
  18. IF k>0 then writeln(s/k) else writeln('NO');
  19. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top