toan9xpro2012

cau 7

Feb 10th, 2017
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. program cau7;
  2. uses crt;
  3. var i,n,s,t:integer;
  4.  
  5. begin
  6. clrscr;s:=0;
  7. write('Nhap n= ');readln(n);
  8. for i:=1 to n do
  9. begin
  10. write('a[',i,']= ');readln(t);
  11. if t mod 2 = 0 then s:=s+t;
  12. end;
  13. write('Tong cac so chan trong day la: ',s);
  14. readln;
  15. end.
Add Comment
Please, Sign In to add comment