You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

16 lines
214 B

template WhileRolled() {
signal input in;
signal output out;
var acc = 0;
var i=0;
while (i<in) {
acc = acc + 1;
i++
}
out <== acc;
}
component main = WhileRolled();