7 kyu
Print a Rectangle Using Asterisks
123 of 949GrahamD
Description:
Write a method that, given two arguments, width
and height
, returns a string representing a rectangle with those dimensions.
The rectangle should be filled with spaces, and its borders should be composed of asterisks (*
).
For example, given width = 3
and height = 3
:
***
* *
***
End each line of the string (including the last one) with a carriage return-line feed combination.
Note: You may assume that width and height will always be greater than zero.
Strings
ASCII Art
Algorithms
Similar Kata:
Stats:
Created | Jun 7, 2017 |
Published | Jun 12, 2017 |
Warriors Trained | 1710 |
Total Skips | 15 |
Total Code Submissions | 4223 |
Total Times Completed | 949 |
C# Completions | 123 |
JavaScript Completions | 791 |
Ruby Completions | 55 |
Total Stars | 22 |
% of votes with a positive feedback rating | 87% of 238 |
Total "Very Satisfied" Votes | 186 |
Total "Somewhat Satisfied" Votes | 43 |
Total "Not Satisfied" Votes | 9 |
Total Rank Assessments | 12 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |