Back to Tracks

Control Flow

Learn how to control the flow of your Rust program using loops and conditional statements.

Basic If-Else Statements

EASY

Learn how to use if-else statements in Rust to control the flow of your program.

Sum of Even Numbers

EASY

Implement a function to sum even numbers in a given range using a for loop.

Countdown

EASY

Implement a countdown timer using a while loop in Rust.

Weekday from Number

EASY

Use Rust's pattern matching to determine the weekday given its number.

Fizz Buzz

EASY

Write a program that prints 'Fizz' for multiples of three, 'Buzz' for multiples of five, and 'FizzBuzz' for multiples of both.

Fibonacci

EASY

Write a function that returns the nth number in the Fibonacci sequence.

Is Prime

MEDIUM

Implement a function to check if a number is prime using logical operators and conditional statements.

Determine Number Characteristics

EASY

Implement a function to describe if a number is positive, negative, or zero, and if it is even or odd.

Factorial Calculator

EASY

Implement a function to calculate the factorial of a non-negative integer using early returns and loops.

Temperature Converter

MEDIUM

Implement a temperature converter that handles various units and errors.

Validate User Input

EASY

Implement early returns in Rust to validate user input for age and email.

Median and mode

MEDIUM

Write a program that calculates the median and mode of a list of numbers.

Find the First Palindrome

HARD

Implement a function to find the first palindrome number in a range using any control flow construct.

Finite State Automaton

HARD

Implement a finite state automaton (FSA) to recognize a specific pattern in a sequence of characters.

Maze Solver

ADVANCED

Implement a maze solver using control flow in Rust to navigate through a maze represented as a grid.