diff --git a/examples/fulladder.rs b/examples/fulladder.rs index 51ea16e..c31b741 100644 --- a/examples/fulladder.rs +++ b/examples/fulladder.rs @@ -110,8 +110,8 @@ fn main() { y.replace(triple[1]); c.replace(triple[2]); - let mut cycle_count = 0_u32; - while circuit.tick() && cycle_count < 10_u32 { + let mut cycle_count = 1; + while circuit.tick() && cycle_count < 11 { cycle_count += 1; } @@ -123,8 +123,6 @@ fn main() { // } // ``` - cycle_count += 1; // To get the correct number of cycles - println!( "{} + {} + {} = {}{} (used {} cycles to reach a stable circuit)", triple[0],