Talk:Loops/Break: Difference between revisions

From Rosetta Code
Content added Content deleted
No edit summary
No edit summary
 
Line 7: Line 7:


[[User:Eoraptor|Eoraptor]] ([[User talk:Eoraptor|talk]]) 22:30, 26 August 2017 (UTC)
[[User:Eoraptor|Eoraptor]] ([[User talk:Eoraptor|talk]]) 22:30, 26 August 2017 (UTC)
==FORTH Task==
The second example is incorrect. First, it will not loop indefinitely. Secondly, it produces numbers outside the 0 to 19 range. The first example is correct. [[User:Superstitionfreeblog|Superstitionfreeblog]] ([[User talk:Superstitionfreeblog|talk]]) 02:55, 23 October 2023 (UTC)

Latest revision as of 02:55, 23 October 2023

C task

There is a minor problem: the program should print another random number before restarting the loop.

There is a very annoying problem: see Talk:Pick random element, where there is an identical fundamental mistake in the C program. While neither of the tasks states explicitly that the distribution has to be uniform, it seems to me that it's implicit in the question.

The solutions given for several other languages use a bad method to generate the random numbers. I understand that for this task it's not fundamental, but then at least it should be stated somewhere that the method is poor.

Eoraptor (talk) 22:30, 26 August 2017 (UTC)

FORTH Task

The second example is incorrect. First, it will not loop indefinitely. Secondly, it produces numbers outside the 0 to 19 range. The first example is correct. Superstitionfreeblog (talk) 02:55, 23 October 2023 (UTC)