fork download
  1. program liczbynieparzyste1000;
  2. {
  3. Suma 1000 liczb nieparzystych poczynając od 7
  4. Pętla repeat
  5. https://i...content-available-to-author-only...e.com/VFVCxw
  6. }
  7. var
  8. n: integer; // ile liczba trzeba sumować
  9. liczba: integer;
  10. suma: integer; // suma liczb
  11. i: integer; // zmienne pomocnicze
  12.  
  13. begin
  14. n := 3;
  15. suma := 0;
  16. liczba := 7;
  17. i := 1;
  18. repeat
  19. suma := suma + liczba;
  20. liczba := liczba + 2;
  21. i := i + 1;
  22. until (i > n);
  23.  
  24. writeln(suma);
  25. end.
Success #stdin #stdout 0s 5628KB
stdin
Standard input is empty
stdout
27