> For the complete documentation index, see [llms.txt](https://calnix.gitbook.io/zk-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://calnix.gitbook.io/zk-notes/zk-puzzles-rareskills/add.circom.md).

# Add.circom

```solidity
pragma circom 2.1.4;


// In this exercise , you need to create a circuit that takes an array "a"
// of length '2' as input and a output "c" .
// Create a circuit that adds the 2 inputs and outputs it .

template Add() {
   // Your code here 
   
   signal input a[2];  //in[0] and in[1]
   signal output c;

   c <== (a[0] + a[1]);
}

component main  = Add();
```

We simply add the inputs, constraint c against that summed value
