Multiplication table by klapaucius

use core::int::*;fn p(n:int){print(fmt!("%-4d",n))}fn main(){let n=from_str(io::stdin().read_line()).unwrap();for range(0,n)|i|{p(i)}println(n.to_str());for range(1,n+1)|i|{p(i);for range(1,n)|j|{p(i*j)}println((i*n).to_str())}}

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

download

return to the top page