Write a boolean truth table for
while ( ans != 'n' || ans != 'N' );
WaltP
Posting Sage w/ dash of thyme
10,505 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
Even though you technically can, NEVER call main(), it is not intended to be a recursive function.
A loop, specifically a while loop in this case, is the correct way to do it. The issue is that his conditional is not written correctly, as WaltP pointed out.
Fbody
Posting Maven
2,930 posts since Oct 2009
Reputation Points: 833
Solved Threads: 393