4 ms·
In case you're wondering (like me) how you'd get input from printf(): > We ab^H^Huse [the Turing-completeness of printf()] to implement a the logic of tic-tac-
by haberman 6y ago
In case you're wondering (like me) how you'd get input from printf():
> We ab^H^Huse [the Turing-completeness of printf()] to implement a the logic of tic-tac-toe entirely within this one printf call (and a call to scanf() to read user input).
So it should be "one printf() and one scanf()."
- sfoley 6y agoShould be "an infinite number of printf()s and scanf()s".
- identity0 6y agoWould you say that an infinite loop has infinite lines of code?
- yjftsjthsd-h 6y agoIt has infinite instructions, yes. (Well, "unbounded" or "endless", if we're being picky.)
- identity0 6y agoNo it doesn’t. It has finite instructions for the loop body, and then one jump instruction for the loop.