Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,17 @@
"doc",
"code"
]
}
},
{
"login": "diogenesdauster",
"name": "Diógenes Dauster",
"avatar_url": "https://avatars2.githubusercontent.com/u/16214631?s=460&u=c397c372c3332d4c5a16a79f4cb5e1141c88bc8e&v=4",
"profile": "https://github.com/diogenesdauster",
"contributions": [
"doc",
"code"
]
}
],
"commitConvention": "none"
}
19 changes: 19 additions & 0 deletions Day1/Advpl/fizzbuzz.prw
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
User function fizzbuzz(num)
Local result := ""
Local i := 1

For i := 1 To num

If i % 3 = 0 .and. i % 5 = 0
result += "FizzBuzz "
Elseif i % 5 = 0
result += "Buzz "
Elseif i % 3 = 0
result += "Fizz "
EndIf

Next

alert(result)

return result
33 changes: 33 additions & 0 deletions Day1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,39 @@ fun fizzBuzz (fizzList: List<Int>) {

fizzBuzz((1..15).toList())
```
## Advpl Implementation

### [fizzbuzz.prw](./Advpl/fizzbuzz.prw)

```advpl

/*
The Fizz Buzz Challenge
Autor: Diógenes Dauster <diogenes.dauster@gmail.com>
GitHub: https://github.com/diogenesdauster
Date: 17/11/2020
*/

User function fizzbuzz(num)
Local result := ""
Local i := 1

For i := 1 To num

If i % 3 = 0 .and. i % 5 = 0
result += "FizzBuzz "
Elseif i % 5 = 0
result += "Buzz "
Elseif i % 3 = 0
result += "Fizz "
EndIf

Next

alert(result)

return result
```

### Have Another solution?

Expand Down