Another update from ingydotnet^djgoku

This commit is contained in:
Ingy döt Net 2015-11-18 06:14:39 +00:00
parent 91df62d461
commit 948b86eafa
7604 changed files with 108452 additions and 22726 deletions

View file

@ -1,4 +1,4 @@
fn nth(num: int) -> String {
fn nth(num: i32) -> String {
format!("{}{}", num, match (num % 10, num % 100) {
(1, 11) => "th",
(1, _) => "st",
@ -12,13 +12,13 @@ fn nth(num: int) -> String {
fn main() {
let ranges = vec![
(0i, 26i),
(250i, 266i),
(1000i, 1026i)
(0, 26),
(250, 266),
(1000, 1026)
];
for &(s, e) in ranges.iter() {
println!("[{}, {}) :", s, e);
for i in range(s, e) {
for i in s..e {
print!("{}, ", nth(i));
}
println!("");