This commit is contained in:
2025-06-30 15:50:20 +02:00
commit 620db6d552
9 changed files with 28874 additions and 0 deletions

26
it_test.rs Normal file
View File

@@ -0,0 +1,26 @@
static mut I: i32 = 1;
fn iterator() -> i32 {
unsafe {
I = I << 1;
I
}
}
fn print_binary(num: i32) {
for shift in (0..32).rev() {
print!("{}", (num >> shift) & 1);
}
println!();
}
fn main() {
let mut run = 1;
while run != 0 {
let next = iterator();
println!("Int: {}", next);
print!("Bin: ");
print_binary(next);
run = next;
}
}