Created
June 14, 2021 05:49
-
-
Save johnson86tw/6963aa584a8b357d82832c759926349e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template Square() { | |
signal input in; | |
signal output out; | |
out <== in * in; | |
} | |
template Add() { | |
signal input in; | |
signal output out; | |
out <== in + 6; | |
} | |
template Calculator() { | |
signal private input secret; | |
signal output out; | |
component square = Square(); | |
component add = Add(); | |
square.in <== secret; | |
add.in <== square.out; | |
out <== add.out; | |
} | |
component main = Calculator(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment