myCompiler myCompiler
Deutsch English Español Français Italiano 日本語 한국어 Nederlands Polski Português
Recent
Login Sign up
Recent
Login Sign up
C

@conqueror

rust match guards

Rust
3 years ago
fn main() { for n in -2..5 { println!("{} is {}",n,match n{ 1 => "one", 0 => "zero", _ if n < 0 => "negative", _ => "plural" }); } }

rustVectors

Rust
3 years ago
fn main() { let mut x = vec!["this","is","a","sentence"]; for i in 0..x.len(){ print!("{} ",x[i]); } println!(); x.insert(1,"line"); for i in 0..x.len(){ print!("{} ",x[i]); }

for

Rust
3 years ago
fn main() { let mut n = 10; for n in 1..=10+n { println!("{}",n); } n-=1; println!("{}",n); }

rustArrays

Rust
3 years ago
fn main() { let mut x = [1,2,3]; println!("{}",x[0]); x = [4,5,6]; println!("{}",x[0]); x[0] = 10; println!("{}",x[0]); }
Previous Next page

Supported languages

Deno JavaScript NodeJS Python Ruby Go C C++ Java C# TypeScript PHP Bash R Octave (MATLAB) Fortran Lua Erlang SQL MySQL MongoDB Clojure D Perl Kotlin Swift Rust Assembly
© 2026 mycompiler.io
Terms of service Privacy policy Contact us