Concurrent computing: Difference between revisions

Content added Content deleted
(Updated to only use standard libraries. Removed comments as language should allow simple enough code.)
m (Specified task.)
Line 1: Line 1:
{{task|Concurrency}}
{{task|Concurrency}}
[[Category:Basic language learning]]
[[Category:Basic language learning]]

;Task:
;Task:
Display "Enjoy", "Rosetta", and "Code" to a screen at exactly the same time, with a new line after each.
Using either native language concurrency syntax or freely available libraries, write a program to display the strings "Enjoy" "Rosetta" "Code", one string per line, in random order.


The language's standard libraries are to be used, with external libraries only being used if the language does not allow this task to be completed with standard libraries.
Concurrency syntax must use [[thread|threads]], tasks, co-routines, or whatever concurrency is called in your language.
<br><br>


(the task has been updated to avoid using programming-specific language, if a better description of displaying strings parallel-ly is found, please edit task)
=={{header|Ada}}==
=={{header|Ada}}==
<lang ada>with Ada.Text_IO, Ada.Numerics.Float_Random;
<lang ada>with Ada.Text_IO, Ada.Numerics.Float_Random;