Advertisement
stev4

Untitled

Nov 8th, 2019
2,014
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Julia 0.33 KB | None | 0 0
  1. #                   #
  2. #   funkcija 5.10   #
  3. #                   #
  4.  
  5. function sumaprirodnih(a)
  6.     println("");
  7.     suma=0;
  8.             for i in 1:a       #ovim forom setamo od a do b za neparne
  9.                 suma=suma+i;
  10.             end
  11.     # return suma; #moze ovako
  12.     println("RESENJE: Suma prvih $a elemenata je $suma !"); #ovo je malo lepsi ispis
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement