Exercises
Explore Rust iteration by practicing with for loops and iterator methods. You will write functions to compute factorials, print bordered patterns, display names vertically with letter positions, reverse iterate strings, and calculate averages from vectors. This lesson deepens your understanding of loops and iterators in Rust programming.
We'll cover the following...
We'll cover the following...
Exercise 1
Implement a factorial using a for loop.
Exercise 2
Using for loops, write a function that prints out borders. With the main function:
You should get the output: ...