This commit is contained in:
2020-06-25 17:15:19 +08:00
parent 6cd7358f3b
commit b8c99ede5b
2 changed files with 26 additions and 1 deletions

2
.gitignore vendored
View File

@@ -2,7 +2,7 @@
# Generated by Cargo
# will have compiled files and executables
target/
99.htm
wasm/pkg/
node_modules/

25
single_file_tests/99.rs Normal file
View File

@@ -0,0 +1,25 @@
fn main() {
println!("<html>");
println!("<head><title>99</title></head>");
println!("<body>");
println!(r#" <table style="font-size:30px;" border="1">"#);
println!(" <tr>");
println!("<th></th>");
for i in 1..=9 {
print!("<th>{}</th>", i);
}
println!();
for r in 1..=9 {
println!(" <tr>");
print!(r#"<th style="width:80px;">{}</th>"#, r);
for c in 1..=9 {
print!(r#"<td style="width:80px;text-align:center;">{}</td>"#, if c <= r { format!("{}", r * c) } else { "".into() });
}
println!();
println!(" <tr>");
}
println!(" </table>");
println!("</body>");
println!("</html>");
}