mirror of
https://git.sfja.dk/Mikkel/slige.git
synced 2025-07-06 12:56:57 +01:00
Compare commits
No commits in common. "8c00000ea4758a3a5468b9017f21604296f4bd90" and "f990e57c85a4d70b3018e34340c3c17a281b7045" have entirely different histories.
8c00000ea4
...
f990e57c85
@ -1,22 +0,0 @@
|
||||
fn print(msg: string) #[builtin(Print)] {}
|
||||
fn println(msg: string) { print(msg + "\n") }
|
||||
|
||||
fn mul(left: int, right: int) -> int {
|
||||
if left == 0 or right == 0 {
|
||||
0
|
||||
} else {
|
||||
left * right
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
if mul(10,2) == 20 {
|
||||
println("test 1 passed")
|
||||
}
|
||||
if mul(3,2) == 6 {
|
||||
println("test 2 passed")
|
||||
}
|
||||
if mul(0,2) == 0 {
|
||||
println("test 3 passed")
|
||||
}
|
||||
}
|
BIN
tk_rap.odt
BIN
tk_rap.odt
Binary file not shown.
BIN
usecase_dos.odt
BIN
usecase_dos.odt
Binary file not shown.
Loading…
Reference in New Issue
Block a user