NEWTON
Asked
5 months ago
6
views
0
Given a felt, I would like to get the sum of the digits. For example, 123 would be 1 + 2 + 3 = 6.
Test 1
Input(s): 123
Output(s): 6
Test 2
Input(s): 577
Output(s): 19
Test 3
Input(s): 88888
Output(s): 40
ㅤ This question was originally posted on Triality
0
answered
5 months ago
How do I write a log based 2 function in Cairo?
Changing a variable with an initialized value recursively with if statements
How to make recursive function in Cairo Lang?
How to make output like "hello world" in Cairo Language (StarkNet)?
What is SHARP in Cairo Language?
Equivalent to Solidity's keccak256(abi.encodePacked())?
Cairo: Getting the squared summation of felts in an array
Does Account Abstraction (StarkNet) support bundling multiple operations at once?
An error “AssertionError: Sender must be passed explicitly when making a direct declaration using —no_wallet.” using the new nile?
What does this error means? (AssertionError: assert_not_zero failed: 0 = 0.)
Can someone explain the difference between unsigned_div_rem and uint256_unsigned_div_rem?
Cairo: Expected '__main__.Id' to be a struct. Found: 'future'
Testing Starknet Cairo contract function with address
How do I connect my DAPP to Starknet testnet using starknetjs?