Julia program how to use continue in the condition, if there is a for loop, and you want to skip certain set of numbers , then we can use continue, for example we need to print only even number so we will skip all the odd numbers using continue keyword.
The program is as follows
for j = 4:40
isodd(j) && continue
println(j)
end
Output:
4
6
8
10
12
14
16
18
20
22
24
26
28
30
32
34
36
38
40
Julia is a Open Source.Julia is free for everyone to use..Julia is a high-level general-purpose dynamic programming language that is designed to address the needs of high-performance numerical analysis and computational science, without the need of separate compilation to be fast.
Julia is used in
- Machine Learning
- Data Science
- Visualisation
- General Purpose
- Parallel Computing
- Scientific Domains
Next : Main Menu
Comments
Post a Comment