Ask coding questions

← Back to all posts
Need some help here!
NewSkooCoder

Dear Replit community, I need some help with my pancake maker project(using swift programming language). This is my first dabbling with code so I know it may be trash, but bare with me.I need some line of code that will kill the program, for example if any of the ingredients are = to 0 I want the program to end itself after saying the line, and not keep spewing out the script. Is there any commands i can use?

Thanks,
NewSkoo

Voters
NewSkooCoder
Comments
hotnewtop
NewSkooCoder

Code is not finished, Imma do the final recipie at the end, ignore the final line lol