initial commit
This commit is contained in:
+35
@@ -0,0 +1,35 @@
|
||||
fn main() {
|
||||
let x = 5;
|
||||
let number = 8;
|
||||
let mut y = 5;
|
||||
println!("Hello, world!");
|
||||
println!("X: {}", x);
|
||||
|
||||
println!("Y: {}", y);
|
||||
|
||||
y = 12;
|
||||
println!("Y has been set to: {}", y);
|
||||
|
||||
if y < 11 {
|
||||
println!("Y is less than 11: Y is {}", y);
|
||||
} else {
|
||||
println!("Y is more than 11: Y is {}", y);
|
||||
}
|
||||
|
||||
y = 6;
|
||||
println!("Y has been set to: {}", y);
|
||||
if y < 11 {
|
||||
println!("Y is less than 11, Y is {}", y);
|
||||
}
|
||||
|
||||
if number % 4 == 0 {
|
||||
println!("Y is divisible by 4");
|
||||
} else if number % 3 == 0 {
|
||||
println!("Y is divisible by 3");
|
||||
} else if number % 2 == 0 {
|
||||
println!("Y is divisible by 3");
|
||||
}
|
||||
println!("Y has been changed to: {}", y);
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user