added(save): just same commit

This commit is contained in:
Tomasz Waszczyk 2022-06-10 14:07:11 +02:00
parent b19f74e8cf
commit df4d738af7
No known key found for this signature in database
GPG Key ID: 2D1E70DB13336E3A
10 changed files with 15 additions and 24 deletions

View File

@ -6,12 +6,11 @@
// check clippy's suggestions from the output to solve the exercise.
// Execute `rustlings hint clippy1` for hints :)
// I AM NOT DONE
use std::f32;
fn main() {
let pi = 3.14f32;
let pi = f32::consts::PI;
let radius = 5.00f32;
let area = pi * f32::powi(radius, 2);

View File

@ -1,7 +1,8 @@
// functions1.rs
// Make me compile! Execute `rustlings hint functions1` for hints :)
// Make me compile! Execute `` for hints :)
// I AM NOT DONE
fn call_me(){}
fn main() {
call_me();

View File

@ -5,8 +5,6 @@
// ready for the next exercise, remove the `I AM NOT DONE` comment below.
// Execute the command `rustlings hint intro1` for a hint.
// I AM NOT DONE
fn main() {
println!("Hello and");
println!(r#" welcome to... "#);

View File

@ -2,8 +2,6 @@
// Make the code print a greeting to the world.
// Execute `rustlings hint intro2` for a hint.
// I AM NOT DONE
fn main() {
println!("Hello {}!");
println!("Hello {}!", "world");
}

View File

@ -2,9 +2,8 @@
// Make me compile!
// Execute the command `rustlings hint variables1` if you want a hint :)
// I AM NOT DONE
fn main() {
x = 5;
let x = 5;
println!("x has the value {}", x);
}

View File

@ -1,10 +1,9 @@
// variables2.rs
// Make me compile! Execute the command `rustlings hint variables2` if you want a hint :)
// I AM NOT DONE
fn main() {
let x;
let x: i32 = 10;
if x == 10 {
println!("Ten!");
} else {

View File

@ -1,10 +1,9 @@
// variables3.rs
// Make me compile! Execute the command `rustlings hint variables3` if you want a hint :)
// I AM NOT DONE
fn main() {
let x = 3;
let mut x = 3;
println!("Number {}", x);
x = 5; // don't change this line
println!("Number {}", x);

View File

@ -1,9 +1,8 @@
// variables4.rs
// Make me compile! Execute the command `rustlings hint variables4` if you want a hint :)
// I AM NOT DONE
fn main() {
let x: i32;
let x: i32 = 10;
println!("Number {}", x);
}

View File

@ -1,11 +1,11 @@
// variables5.rs
// Make me compile! Execute the command `rustlings hint variables5` if you want a hint :)
// I AM NOT DONE
fn main() {
let number = "T-H-R-E-E"; // don't change this line
let mut number = "T-H-R-E-E"; // don't change this line
println!("Spell a Number : {}", number);
number = 3;
println!("Number plus two is : {}", number + 2);
number = "T-W-O";
// println!("Number plus two is : {}", number + 2);
}

View File

@ -1,9 +1,8 @@
// variables6.rs
// Make me compile! Execute the command `rustlings hint variables6` if you want a hint :)
// I AM NOT DONE
const NUMBER = 3;
fn main() {
println!("Number {}", NUMBER);
const NUMBER: u32 = 3;
println!("Number: {}", NUMBER);
}