Skip to content

Commit

Permalink
add rustfinity constant and primitive data solutions
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphonseMehounme committed Nov 28, 2024
1 parent fab81b8 commit bb4e324
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Rust/rustifinity/challenges/constants.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Define a constant MAX_SIZE with a value of 100.
// NOTE: Define the constant outside the main function
// Your code here

pub fn main() -> i32 {
MAX_SIZE
}

const MAX_SIZE : i32 = 100;
10 changes: 10 additions & 0 deletions Rust/rustifinity/challenges/primitive-data-types.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pub fn data_types() {
// 1. Define variable `x` of type `u8`
let x : u8;
// 2. Define variable `y` of type `f64`
let y : f64;
// 3. Define variable `z` of type `bool`
let z : bool;
// 4. Define variable `a` of type `char`
let a : char;
}

0 comments on commit bb4e324

Please sign in to comment.