Created
November 9, 2018 16:15
-
-
Save mamaz/999006e4ec7a1611baff9e7bfaa77193 to your computer and use it in GitHub Desktop.
Simple print task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package printTask | |
import ( | |
"fmt" | |
"sync" | |
) | |
// PrintM - Just print M a hundre times | |
func PrintM(waitgroup *sync.WaitGroup) { | |
defer waitgroup.Done() | |
const a = 'M' | |
for num := 0; num < 100; num++ { | |
fmt.Printf("%c ", a) | |
} | |
} | |
// PrintNumbers - print number | |
func PrintNumbers(waitgroup *sync.WaitGroup) { | |
defer waitgroup.Done() | |
for num := 0; num < 100; num++ { | |
fmt.Printf("%d ", num) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment