From 6fecafde196cd3eea8c6dd74dff80487761c42e8 Mon Sep 17 00:00:00 2001 From: zainabdnaya Date: Thu, 30 Jun 2022 18:38:29 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8C=20IMPROVE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- subjects/countstars/README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/subjects/countstars/README.md b/subjects/countstars/README.md index 0f72326e..ebd2d58a 100644 --- a/subjects/countstars/README.md +++ b/subjects/countstars/README.md @@ -1,15 +1,21 @@ ## CountStars ### Instructions -Write a function named `CountStar` that makes you fall asleep by counting stars, it takes an integer in the parameter -- If the number is negative or equal to 0, return "`No star`" +Write a function called CountStars that counts the stars up to a number given as an argument. +- If the number is negative or equal to 0, return "`No stars`" - No need to manage overflow. +### Expected Function + ```go func CountStars(num int) string { } ``` +### Usage + +Here is a possible program to test your function : + ```go import ( "fmt" @@ -28,6 +34,6 @@ func main() { $ go run . 1 star...2 stars...3 stars...4 stars...5 stars 1 star...2 stars...3 stars...4 stars -No star +No stars 1 star ```