NEWTON
Asked
10 months ago
15
views
0
How do you write the pseudocode:
if x == 1 and y == 1, then return 1.
Else return 0.
ㅤ This question was originally posted on Triality
0
You can also do nested and statements like this as well
func main{output_ptr : felt*}():
let (res) = andFunc()
serialize_word(res)
return ()
end
func andFunc() -> (res : felt):
let x = 1
let y = 1
if x == 1:
if y == 1:
return (1)
end
end
return (0)
end
ㅤ This answer was originally posted on Triality
answered
10 months ago
Cairo: Else if statement
Cairo: Using less than or greater than in conditional
Writing a "not" operation in Cairo
Cairo: How to return true from a function?
Cairo: How do I initialize an array in cairo
How to make conditional expressions if..then..else in Cairo lang?
How do you check if a number is even in Cairo?
What is the technical difference of Kakarot compare to Nethermind's Warp?
Does cross-chain bridge produce its own block? Or it only verify the blocks from A/B chain?
why does keccak256 replace sha256 in warp?
How to get the contract ABI using Starknet.Py?
How to select the network my Pathfinder node runs on?
Braavos does not seem be injected when running app locally it does work when deployed is there something i should check?
What resources (Github repos, projects) do you follow about Cairo Language? Why?