# for-loops for n in [1, 2, 3, 4, 5] println(n) end for n in 1:2:10 println(n) end N = 1_000_000 for n in 0:100_000:N println(n) end # start:step:finish for i in 1:20 println(i) end 1:20 rand() # for-loops Exercises # Write a Julia program to construct this pattern below: # * # * * # * * * # * * * * # * * * * * # * * * * # * * * # * * # * # Project Euler Problem 1 # If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. # The sum of these multiples is 23. # Find the sum of all the multiples of 3 or 5 below 1000. # Project Euler Problem 2 # Each new term in the Fibonacci sequence is generated by adding the previous two terms. # By considering the terms in the Fibonacci sequence whose values do not exceed four million, # find the sum of the even-valued terms.