Skip to content

Commit a144f01

Browse files
authored
Merge pull request #4001 from Cesar-Ch/add-cesar-roadmap
#00 - Rust
2 parents ecc980f + ac0d9fe commit a144f01

File tree

1 file changed

+40
-0
lines changed
  • Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/rust

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// URL: https://www.rust-lang.org/
2+
3+
// This is a one line comment
4+
5+
/*
6+
This is a multi line comment
7+
*/
8+
9+
fn main() {
10+
// This is a variable
11+
let mut my_varianble = 5;
12+
println!("The value of my_varianble is: {}", my_varianble);
13+
my_varianble = 6;
14+
println!("The value of my_varianble is: {}", my_varianble);
15+
// This is a constant
16+
let my_constant = 7;
17+
println!("The value of my_constant is: {}", my_constant);
18+
19+
// Data types
20+
// Integer
21+
// Signed
22+
// i8, i16, i32, i64, i128, isize
23+
// Unsigned
24+
// u8, u16, u32, u64, u128, usize
25+
let my_integer = 8;
26+
println!("The value of my_integer is: {}", my_integer);
27+
// Floating point
28+
// f32, f64
29+
let my_float = 9.0;
30+
println!("The value of my_float is: {}", my_float);
31+
// Boolean
32+
let my_boolean = true;
33+
println!("The value of my_boolean is: {}", my_boolean);
34+
// Character
35+
let my_char = '🤡';
36+
println!("The value of my_char is: {}", my_char);
37+
// String
38+
let my_string = "¡Hola, Rust!";
39+
println!("{}", my_string);
40+
}

0 commit comments

Comments
 (0)