about | help | code help+videos | done | prefs |
Write a method that creates a String that represents a square of a given dimension. A square is created by adding the appropriate number of stars ('*') to the string. Think of creating it in slices. To indicate the end of a slice, put a newline (':') after the last star in that slice. For example, a square of side 3 is represented by the string "***:***:***:". mkSquare(3) → "***:***:***:" mkSquare(1) → "*:" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 110
Copyright Nick Parlante 2017 - privacy