Skip to content

Commit

Permalink
finish clippy1
Browse files Browse the repository at this point in the history
  • Loading branch information
cyz-ing committed Jan 15, 2025
1 parent be60e8c commit a3cd948
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions exercises/clippy/clippy1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@

// I AM NOT DONE

use std::f32;
use std::f32::consts::PI;

fn main() {
let pi = 3.14f32;
let radius = 5.00f32;

let area = pi * f32::powi(radius, 2);

let area = PI * f32::powi(radius, 2);
println!(
"The area of a circle with radius {:.2} is {:.5}!",
radius, area
)
);
}

0 comments on commit a3cd948

Please sign in to comment.