1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

examples: reorganize

This commit is contained in:
Alexey
2020-03-21 11:47:38 +03:00
committed by GitHub
parent e57804e6c2
commit a5c0d89c71
18 changed files with 40 additions and 40 deletions

View File

@@ -1,21 +1,18 @@
fn main() {
mut s := ''
for n in 1..101 {
if n % 3 == 0 {
s += 'Fizz'
}
if n % 5 == 0 {
s += 'Buzz'
}
if s == '' {
println(n)
} else {
println(s)
}
s = ''
}
mut s := ''
for n in 1 .. 101 {
if n % 3 == 0 {
s += 'Fizz'
}
if n % 5 == 0 {
s += 'Buzz'
}
if s == '' {
println(n)
}
else {
println(s)
}
s = ''
}
}