Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Loops-While/Erlang/loops-while.erl
Normal file
12
Task/Loops-While/Erlang/loops-while.erl
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
-module(while).
|
||||
-export([loop/0]).
|
||||
|
||||
loop() ->
|
||||
loop(1024).
|
||||
|
||||
loop(N) when N div 2 =:= 0 ->
|
||||
io:format("~w~n", [N]);
|
||||
|
||||
loop(N) when N >0 ->
|
||||
io:format("~w~n", [N]),
|
||||
loop(N div 2).
|
||||
Loading…
Add table
Add a link
Reference in a new issue