All the code we've written so far follows a straight path. It flows line by line until the code ends. But we can control the flow of code. Here, for example, is a halt:

Right! We use exit() to exit the program and ignore the rest of the code.

It requires 0 as an argument, just like we return 0 when exiting normally. We also need to include the <cstdlib> library.

Let's give it another try!