repl.it
@haideralsh/

WhatIsN

Go

No description

fork
loading
Files
  • main.go
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package main

import "fmt"

func main() {
  fmt.Println(WhatIsN(10))
}

func WhatIsN(num int) int {
  if (num % 5 == 0) {
    return 1
  }

  return 0
}