From 3266406fb2d7d532395d64c82d56e5ab9440f705 Mon Sep 17 00:00:00 2001 From: hamza Date: Mon, 20 Jun 2022 12:10:45 +0100 Subject: [PATCH] subject(communmultiple):add readme --- subjects/commonmultiples/README.md | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 subjects/commonmultiples/README.md diff --git a/subjects/commonmultiples/README.md b/subjects/commonmultiples/README.md new file mode 100644 index 00000000..f02e2bcf --- /dev/null +++ b/subjects/commonmultiples/README.md @@ -0,0 +1,42 @@ +## common-multiples + +### Instructions + +Write a function to check whether a given non-negative number is a multiple of 3 or 7. +- If the number is a multiple of 3 or 7, return `true`. +- If the number is not a multiple of 3 or 7, return `false`. +- If the number is less or equal to 0, return `false`. + +### Expected function + +```go +func IsMultiple(number int) bool { + // Your code here +} +``` + +### Usage +```go +package main + +import "fmt" + +func main() { + fmt.Println(IsMultiple(3)) + fmt.Println(IsMultiple(7)) + fmt.Println(IsMultiple(8)) + fmt.Println(IsMultiple(9)) + fmt.Println(IsMultiple(-1)) +} +``` + +and the output should be: + +```console +$ go run . +true +true +false +false +false +``` \ No newline at end of file