/MeanMedianMode

Calculate Mean, Median & Mode in Rust

Primary LanguageRust

Calculate Mean, Median and Mode

Given a list of integers, calculate the Mean, Median and Mode.

Test run

⇒  cargo run 16 12 8 11 4 17 18 19 8 1 18 10 10 5
    Finished dev [unoptimized + debuginfo] target(s) in 0.00s
     Running `target/debug/meanmedianmode 16 12 8 11 4 17 18 19 8 1 18 10 10 5`
* Statistical Calculation *
>> Enter list of integers for Statistical calculation!
Mean: 11.214286
Median: 10.5
Mode: [8.0, 18.0, 10.0]

⇒  cargo run 9 10 12 13 13 13 15 15 16 16 18 22 23 24 24 25
    Finished dev [unoptimized + debuginfo] target(s) in 0.00s
     Running `target/debug/meanmedianmode 9 10 12 13 13 13 15 15 16 16 18 22 23 24 24 25`
* Statistical Calculation *
>> Enter list of integers for Statistical calculation!
Mean: 16.75
Median: 15.5
Mode: [13.0]