V言語

for i in 1..101 {
    if i % 15 == 0 {
        print("FizzBuzz")
    } else if i % 3 == 0 {
        print("Fizz")
    } else if i % 5 == 0 {
        print("Buzz")
    } else {
        print("$i")
    }
    print("\n")
}
  • information_technology/programming_language/v/start.txt
  • 最終更新: 2024/11/27 11:01
  • by snake