Relative Frequency by Kroisse

fn main(){for io::stdin().each_line|l|{println(fmt!("%.6f",(l.to_bytes().count(&l[0])-1)as float/(l.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