fn main() {
    let mut y = 10;
    println!("The initial value of y is: {}", y);

    y = 20;
    println!("The new value of y is: {}", y);
}
 
by

Rust Online Compiler

Write, Run & Share Rust code online using OneCompiler's Rust online compiler for free. It's one of the robust, feature-rich online compilers for Rust language. Getting started with the OneCompiler's Rust editor is easy and fast. The editor shows sample boilerplate code when you choose language as Rust and start coding.