Talk:Guess the number/With feedback (player): Difference between revisions
Content added Content deleted
(observation about the C example) |
Walterpachl (talk | contribs) (removed bad advice) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==C code, -Wall, and end of main()== |
==C code, -Wall, and end of main()== |
||
Hitting "Y" is not the only way to end main(). Try ctrl-D, and your program will exit with code 255 (or whatever eof is). Generally, using scanf() for interactive input is a bad idea, just so you know. --[[User:Ledrug|Ledrug]] 21:57, 28 June 2011 (UTC) |
Hitting "Y" is not the only way to end main(). Try ctrl-D, and your program will exit with code 255 (or whatever eof is). Generally, using scanf() for interactive input is a bad idea, just so you know. --[[User:Ledrug|Ledrug]] 21:57, 28 June 2011 (UTC) |
||
== REXX solution == |
|||
changing Upper info to info=translate(info) makes it work for all Rexxes I know |
|||
--[[User:Walterpachl|Walterpachl]] 06:25, 1 July 2012 (UTC) |
Latest revision as of 08:49, 1 July 2012
C code, -Wall, and end of main()
Hitting "Y" is not the only way to end main(). Try ctrl-D, and your program will exit with code 255 (or whatever eof is). Generally, using scanf() for interactive input is a bad idea, just so you know. --Ledrug 21:57, 28 June 2011 (UTC)
REXX solution
changing Upper info to info=translate(info) makes it work for all Rexxes I know
--Walterpachl 06:25, 1 July 2012 (UTC)