mirror of
https://github.com/arnaucube/circom.git
synced 2026-02-07 03:06:42 +01:00
for loops
This commit is contained in:
16
test/circuits/addconst1.circom
Normal file
16
test/circuits/addconst1.circom
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
|
||||
template AddConst(c) {
|
||||
signal input in;
|
||||
signal output out;
|
||||
var a = 2;
|
||||
var b = 3;
|
||||
a=a+b;
|
||||
a=a+4;
|
||||
a=a+c;
|
||||
|
||||
out <== 5 + a + in;
|
||||
}
|
||||
|
||||
// It should out <== in + 1+2+3+4+5 = in + 15
|
||||
component main = AddConst(1);
|
||||
Reference in New Issue
Block a user