zoukankan      html  css  js  c++  java
  • Rustlings__variables

    练习过程中的随手记,很多问题也未深究,,简单问题可能直接贴改完之后的代码,..分享出来,若能帮助大家,意外乐趣

    variables1.rs

    // variables1.rs
    // Make me compile! Execute the command `rustlings hint variables1` if you want a hint :)
    
    // About this `I AM NOT DONE` thing:
    // We sometimes encourage you to keep trying things on a given exercise,
    // even after you already figured it out. If you got everything working and
    // feel ready for the next exercise, remove the `I AM NOT DONE` comment below.
    
    
    fn main() {
        let x = 5;
        println!("x has the value {}", x);
    }
    
    

    variables2.rs

    // variables2.rs
    // Make me compile! Execute the command `rustlings hint variables2` if you want a hint :)
    
    
    fn main() {
        let x=1;
        if x == 10 {
            println!("Ten!");
        } else {
            println!("Not ten!");
        }
    }
    

    variables3.rs

    // variables3.rs
    // Make me compile! Execute the command `rustlings hint variables3` if you want a hint :)
    
    
    fn main() {
        let mut x = 3;
        println!("Number {}", x);
        x = 5;
        println!("Number {}", x);
    }
    

    variables4.rs

    // variables4.rs
    // Make me compile! Execute the command `rustlings hint variables4` if you want a hint :)
    
    
    fn main() {
        let x: i32 = 1;
        println!("Number {}", x);
    }
    

    variables5.rs

    // variables5.rs
    // Make me compile! Execute the command `rustlings hint variables5` if you want a hint :)
    
    fn main() {
        let number = "3";
        println!("Number {}", number);
        let number = 3;
        println!("Number {}", number);
    }
    
  • 相关阅读:
    关于yarn的spark配置属性
    spark1.2.0编译
    sqoop1.99.4 JAVA API操作
    数据库范式(1NF 2NF 3NF BCNF)
    HTTP协议详解【转载】
    ESI 动态缓存技术[转载]
    ESI+varnish页面片段缓存
    用 Gearman 分发 PHP 应用程序的工作负载【转载】
    介绍 JSON的
    跨多种环境部署 Gearman -改善应用程序性能和降低服务器负载
  • 原文地址:https://www.cnblogs.com/nightwindnw/p/Rustlings_variables.html
Copyright © 2011-2022 走看看