-
[Rust연습]Easy Rust 024: Control flow 1(if, else if, else)코딩Coding/Rust연습 2021. 12. 12. 20:25728x90
// CONTROL FLOW fn main() { let my_number = 17; if my_number == 7 { println!("It's seven"); } else if my_number == 6 { println!("It's six") } else { println!("It's something else"); } }
출처 :
https://www.youtube.com/watch?v=UAymDOpv_us&list=PLfllocyHVgsRwLkTAhG0E-2QxCf-ozBkk&index=25
반응형'코딩Coding > Rust연습' 카테고리의 다른 글
Rust연습] 16진수출력❤️HexRGB(Color) 연습출처 : Rust 101 - Lecture 1 (0) 2022.04.04 Rust연습]자연수 유니코드ℕ Unicode번호(16진수)알아보기 (0) 2022.03.23 Rust연습-curves_rs::canvas,pixel by (0) 2022.02.03 Rust연습]Easy Rust 024: Control flow 1(match+if) (0) 2021.12.12 RUST연습]Easy Rust 022: Vecs (0) 2021.12.12 RUST연습]변수 사이즈크기 알아보기(use std::mem::size_of;) (0) 2021.12.10 Rust연습]Shadowing (0) 2021.12.09 RUST연습]Rust Crash Course | Rustlang -44:47부터 (0) 2021.12.07