KaizeNodeLabs / stark-cairo-nodes

Set of scripts written in Cairo/Starknet to learn and teach newcomers the ecosystem.
MIT License
16 stars 25 forks source link

feat: add max number in array script #39

Closed GideonBature closed 3 days ago

GideonBature commented 3 days ago

Closes #33

I added a script that returns the maximum number of a given array, created a module for it with the name max_number_array.

with a lib.cairo and max_number_array.cairo files, the lib.cairo serving as what exposes the max_number_array.cairo as a module and the max_number_array.cairo holding the function that finds the maximum number in any array that will be passed to the function as an argument.

Afterwards, scarb build was used to build the code and scarb cairo-run was used to run the code to make sure it's working as expected.

image

danielcdz commented 3 days ago

Awesome! Can you just add a .tool-versions file with the Scarb version you are using?

GideonBature commented 3 days ago

Definitely, let me do that ASAP. Thank you!