Square root
Find the positive side length of a square from its area. Multiplying the answer by itself gives the original area.
f64::sqrt
Simple example
Find the square root of nine.
Start9
Result3
fn main() {
println!("{}", (9.0_f64).sqrt());
}
3
Advertisements
Everyday examples
A square garden covers 36 square metres. How long is one side?
Start36
Result6
fn main() {
println!("{}", (36.0_f64).sqrt());
}
6
A square mosaic has 81 tiles arranged in equal rows and columns. How many tiles are in one row?
Start81
Result9
fn main() {
println!("{}", (81.0_f64).sqrt());
}
9
A square stage covers 49 square metres. How long is the front edge?
Start49
Result7
fn main() {
println!("{}", (49.0_f64).sqrt());
}
7