Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Loops-Break/R/loops-break.r
Normal file
12
Task/Loops-Break/R/loops-break.r
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
sample0to19 <- function() sample(0L:19L, 1,replace=TRUE)
|
||||
repeat
|
||||
{
|
||||
result1 <- sample0to19()
|
||||
if (result1 == 10L)
|
||||
{
|
||||
print(result1)
|
||||
break
|
||||
}
|
||||
result2 <- sample0to19()
|
||||
cat(result1, result2, "\n")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue