basic for loop + examples -> era3
This commit is contained in:
parent
dd7af341a3
commit
0bc8b2ef55
24 changed files with 222 additions and 201 deletions
|
|
@ -20,9 +20,10 @@ tot = tot * 6.0
|
|||
# get the absolute value of a number
|
||||
fn abs(x: float) -> float {
|
||||
if x < 0.0 {
|
||||
return -x
|
||||
-x
|
||||
} else {
|
||||
x
|
||||
}
|
||||
return x
|
||||
}
|
||||
|
||||
# calculate an approximation of the square root of tot using
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue