arnaucube
arnaucube/circomPublic Self-hosted repository
circom/test/circuits/whilerolled.circom
test/circuits/whilerolled.circomRaw
 1template WhileRolled() {
 2    signal input in;
 3    signal output out;
 4
 5    var acc = 0;
 6
 7    var i=0;
 8    while (i<in) {
 9        acc = acc + 1;
10        i++
11    }
12
13    out <== acc;
14}
15
16component main = WhileRolled();