done with basic calc

This commit is contained in:
2025-02-20 09:59:05 +05:30
parent 57475122a9
commit 7910a25928
9 changed files with 49 additions and 14 deletions

View File

@@ -2,7 +2,13 @@
/// `13` if `n` is divisible by `3`,
/// `17` otherwise.
fn magic_number(n: u32) -> u32 {
todo!()
if n % 2 == 0 {
return 12;
} else if n % 3 == 0 {
return 13;
} else {
return 17;
}
}
#[cfg(test)]