Relative Frequency by teebee

fn main(){for io::stdin().each_line|a|{print(fmt!("%.6f
",(str::to_chars(a).count(~a.char_at(0))-1)as float/(a.len()as float-2.)))}}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page