mirror of https://git.sr.ht/~garritfra/sabre
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
330 B
13 lines
330 B
3 years ago
|
fn main() {
|
||
|
let number = 6
|
||
|
|
||
|
if number % 4 == 0 {
|
||
|
println("number is divisible by 4")
|
||
|
} else if number % 3 == 0 {
|
||
|
println("number is divisible by 3")
|
||
|
} else if number % 2 == 0 {
|
||
|
println("number is divisible by 2")
|
||
|
} else {
|
||
|
println("number is not divisible by 4, 3, or 2")
|
||
|
}
|
||
|
}
|