0% developed

Programming Basics/Conditions

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Conditions are used in programming to only do something in the event of something else. This is incredibly useful in a number of tasks.

For example, one might prevent divide by zero errors by check to make sure the devisor is not zero first, and then only dividing if the devisor is not zero.