Search⌘ K

Challenge 1: Check Divisibility by 3 and 4

Explore how to create a Rust function that determines whether an integer is divisible by 3, 4, both, or neither. This lesson helps you practice writing conditional logic within functions, reinforcing your understanding of Rust's approach to data handling and return values.

Problem Statement

Write a function test_divisibility_by_3_4 which will check whether a given integer number is divisible by 3 or 4.

  • If the number is divisible by both
...