diff options
| author | mo khan <mo.khan@gmail.com> | 2019-10-23 20:11:29 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2019-10-23 20:11:29 -0600 |
| commit | d87ddbb288b7407179285c0f5193b3272027eea6 (patch) | |
| tree | c659940475e3954252b66fad31aec1c153e7aa37 /repeat.go | |
| parent | da86ef8bd27327bf019e65751a827744e3a46a6e (diff) | |
Add times parameter
Diffstat (limited to 'repeat.go')
| -rw-r--r-- | repeat.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,8 +1,8 @@ package main -func Repeat(character string) string { +func Repeat(character string, times int) string { var repeated string - for i := 0; i < 5; i++ { + for i := 0; i < times; i++ { repeated += character } return repeated |
