aboutsummaryrefslogtreecommitdiff
path: root/ch2/2-02_no-logical-operators.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-02-28Change 2-02's solution to a while loopzlg1-11/+7
A recursive function is a bit much for something that simple.
2013-02-27Solve Exercise 2-02: No logical operatorszlg1-0/+44
The text doesn't specify which technique to use. The section outlined operator precedence, but I couldn't think of a way to check for truth in the three main expressions without logical operators. So I turned to a recursive function. It works, but I'm not sure if it's what K&R were after.