mirror of
https://github.com/arnaucube/circom.git
synced 2026-02-07 03:06:42 +01:00
If added
This commit is contained in:
26
test/circuits/ifrolled.circom
Normal file
26
test/circuits/ifrolled.circom
Normal file
@@ -0,0 +1,26 @@
|
||||
template Main() {
|
||||
signal input in;
|
||||
signal output out[3];
|
||||
|
||||
if (in == 0) {
|
||||
out[0] <-- 1; // TRUE
|
||||
}
|
||||
if (in != 0) {
|
||||
out[0] <-- 0;
|
||||
}
|
||||
|
||||
if (in == 1) {
|
||||
out[1] <-- 1; // TRUE
|
||||
} else {
|
||||
out[1] <-- 0;
|
||||
}
|
||||
|
||||
if (in == 2) {
|
||||
out[2] <-- 1;
|
||||
} else {
|
||||
out[2] <-- 0; // TRUE
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
component main = Main();
|
||||
Reference in New Issue
Block a user