Exercises

We'll cover the following...

Exercise 1

Implement a factorial using a for loop.

Press + to interact
#[allow(unused_variables, unused_mut)]
fn fact(x: u32) -> u32 {
// Write your code here!
0
}

Exercise 2

Using for loops, write a function that prints out borders. With the main function:

Press + to interact
fn main() {
print_border(6, 5);
}

You should get the ...

Access this course and 1400+ top-rated courses and projects.