forked from TheRenegadeCoder/sample-programs-website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated Sample Programs website automatically
on-behalf-of: @TheRenegadeCoder <[email protected]>
- Loading branch information
1 parent
40a8854
commit 88e7b92
Showing
5 changed files
with
61 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
authors: | ||
- rzuckerm | ||
date: 2023-12-21 | ||
featured-image: fizz-buzz-in-every-language.png | ||
last-modified: 2023-12-21 | ||
layout: default | ||
tags: | ||
- fizz-buzz | ||
- verve | ||
title: Fizz Buzz in Verve | ||
--- | ||
|
||
Welcome to the [Fizz Buzz](https://sampleprograms.io/projects/fizz-buzz) in [Verve](https://sampleprograms.io/languages/verve) page! Here, you'll find the source code for this program as well as a description of how the program works. | ||
|
||
## Current Solution | ||
|
||
{% raw %} | ||
|
||
```verve | ||
fn fizz_buzz_line(n: Int) -> String { | ||
match [n % 3, n % 5] { | ||
case [0, 0]: "FizzBuzz" | ||
case [0, _]: "Fizz" | ||
case [_, 0]: "Buzz" | ||
case _: to_string(n) | ||
} | ||
} | ||
fn fizz_buzz(start: Int, end: Int) { | ||
if not(start > end) { | ||
print(fizz_buzz_line(start)) | ||
fizz_buzz(start + 1, end) | ||
} | ||
} | ||
fizz_buzz(1, 100) | ||
``` | ||
|
||
{% endraw %} | ||
|
||
Fizz Buzz in [Verve](https://sampleprograms.io/languages/verve) was written by: | ||
|
||
- rzuckerm | ||
|
||
If you see anything you'd like to change or update, [please consider contributing](https://github.com/TheRenegadeCoder/sample-programs). | ||
|
||
## How to Implement the Solution | ||
|
||
No 'How to Implement the Solution' section available. [Please consider contributing](https://github.com/TheRenegadeCoder/sample-programs-website). | ||
|
||
## How to Run the Solution | ||
|
||
No 'How to Run the Solution' section available. [Please consider contributing](https://github.com/TheRenegadeCoder/sample-programs-website). |