primitive_types done

This commit is contained in:
stephan.klauberg 2023-10-06 07:21:46 +02:00
parent e8961a89de
commit 78a4f7215e
3 changed files with 8 additions and 8 deletions

View File

@ -6,7 +6,7 @@
// Execute `rustlings hint primitive_types1` or use the `hint` watch subcommand
// for a hint.
// I AM NOT DONE
// I AM DONE
fn main() {
// Booleans (`bool`)
@ -16,7 +16,7 @@ fn main() {
println!("Good morning!");
}
let // Finish the rest of this line like the example! Or make it be false!
let is_evening= true;// Finish the rest of this line like the example! Or make it be false!
if is_evening {
println!("Good evening!");
}

View File

@ -6,7 +6,7 @@
// Execute `rustlings hint primitive_types2` or use the `hint` watch subcommand
// for a hint.
// I AM NOT DONE
// I AM DONE
fn main() {
// Characters (`char`)
@ -22,7 +22,7 @@ fn main() {
println!("Neither alphabetic nor numeric!");
}
let // Finish this line like the example! What's your favorite character?
let your_character='@';// Finish this line like the example! What's your favorite character?
// Try a letter, try a number, try a special character, try a character
// from a different language than your own, try an emoji!
if your_character.is_alphabetic() {

View File

@ -2,13 +2,13 @@
//
// Create an array with at least 100 elements in it where the ??? is.
//
// Execute `rustlings hint primitive_types3` or use the `hint` watch subcommand
// Execute `r'ustlings hint primitive_types3` or use the `hint` watch subcommand
// for a hint.
// I AM NOT DONE
// I AM DONE
fn main() {
let a = ???
let a = ['?';101];
if a.len() >= 100 {
println!("Wow, that's a big array!");