Solution Review 1: Check Divisibility by 3 and 4
Understand how to write Rust functions that take an integer input and use conditional statements to check its divisibility by 3 and 4. This lesson helps you learn to return different integer results based on these conditions, building foundational skills in function creation and logic handling.
We'll cover the following...
We'll cover the following...
Solution:
Explanation
The test_divisibility_by_3_4 takes an integer a as a parameter to the function and returns an integer of type i32.
-
On line 3 ...