more examples
This commit is contained in:
parent
c5a843ea39
commit
9003149114
19 changed files with 287 additions and 0 deletions
18
examples/neutral-pH.ang
Normal file
18
examples/neutral-pH.ang
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import "../lib/math.ang"
|
||||
|
||||
# Inputs
|
||||
c := 1.0*pow(10.0, -2.0)
|
||||
|
||||
println(c)
|
||||
pH := -log(c, 10.0)
|
||||
|
||||
println(pH)
|
||||
|
||||
if pH == 7.0 {
|
||||
println("pH-en er nøytral (=7)")
|
||||
} else if pH < 7.0 {
|
||||
println("pH-en er sur (<7)")
|
||||
} else {
|
||||
println("pH-en er basisk (>7)")
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue