Skip to content

Commit

Permalink
for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Richa-iitr committed Mar 1, 2024
1 parent 21360a8 commit 205d1e5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ForLoop/ForLoop.circom
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ pragma circom 2.1.4;
// Using a forLoop , add a[0] and a[1] , 4 times in a row .

template ForLoop() {

signal input a[2];
signal output c;
var sum=0;
for(var i=0;i<4;i++) {
sum += a[0] +a[1];
}
c<==sum;
// Your Code here..

}
Expand Down

0 comments on commit 205d1e5

Please sign in to comment.