tbs0015.pp 478 B

123456789101112131415161718192021
  1. program test;
  2. type
  3. realgr= array [1..1000] of double;
  4. var
  5. sx :realgr;
  6. i :integer;
  7. stemp :double;
  8. begin
  9. sx[1]:=10;
  10. sx[2]:=-20;
  11. sx[3]:=30;
  12. sx[4]:=-40;
  13. sx[5]:=50;
  14. sx[6]:=-60;
  15. i:=1;
  16. stemp:=1000;
  17. stemp := stemp+abs(sx[i])+abs(sx[i+1])+abs(sx[i+2])+abs(sx[i+3])+
  18. abs(sx[i+4])+abs(sx[i+5]);
  19. writeln(stemp);
  20. if stemp<>1210.0 then halt(1);
  21. end.