Skip to content

Instantly share code, notes, and snippets.

@shar1z
Created May 8, 2019 08:44
Show Gist options
  • Save shar1z/58d0631faaff62d534a81877d61b69c1 to your computer and use it in GitHub Desktop.
Save shar1z/58d0631faaff62d534a81877d61b69c1 to your computer and use it in GitHub Desktop.
Rust Example file
fn main() {
let greetings = ["Hello", "Hola", "Bonjour",
"Ciao", "こんにちは", "안녕하세요",
"Cześć", "Olá", "Здравствуйте",
"Chào bạn", "您好", "Hallo",
"Hej", "Ahoj", "سلام","สวัสดี"];
for (num, greeting) in greetings.iter().enumerate() {
print!("{} : ", greeting);
match num {
0 => println!("This code is editable and runnable!"),
1 => println!("¡Este código es editable y ejecutable!"),
2 => println!("Ce code est modifiable et exécutable !"),
3 => println!("Questo codice è modificabile ed eseguibile!"),
4 => println!("このコードは編集して実行出来ます!"),
5 => println!("여기에서 코드를 수정하고 실행할 수 있습니다!"),
6 => println!("Ten kod można edytować oraz uruchomić!"),
7 => println!("Este código é editável e executável!"),
8 => println!("Этот код можно отредактировать и запустить!"),
9 => println!("Bạn có thể edit và run code trực tiếp!"),
10 => println!("这段代码是可以编辑并且能够运行的!"),
11 => println!("Dieser Code kann bearbeitet und ausgeführt werden!"),
12 => println!("Den här koden kan redigeras och köras!"),
13 => println!("Tento kód můžete upravit a spustit"),
14 => println!("این کد قابلیت ویرایش و اجرا دارد!"),
15 => println!("โค้ดนี้สามารถแก้ไขได้และรันได้"),
_ => {},
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment