/**
 * This exercise focuses on designing patterns using nested loops.
 *
 * Given the width and height of a fabric, you are required to design a specific pattern.
 * Each element of the pattern is represented by a combination of two characters: '+' and '-'.
 * Your task is to complete the code to generate the pattern as per the given width and height.
 *
 * @param width an integer representing the width of the fabric
 * @param height an integer representing the height of the fabric
 * @return A string representing the fabric pattern
 *
 * Examples:
 * designPatterns(3, 3) should return:
 * +++
 * +++
 * +++
 *
 * designPatterns(4, 5) should return:
 * ++++
 * ++++
 * ++++
 * ++++
 * ++++
 */
fun designPatterns(width: Int, height: Int): String {

    val pattern = StringBuilder()
    repeat(height) {
        repeat(width) {
            pattern.append("+") // Fill the code to add a '+' character to the pattern
        }
        pattern.append("\n") // Fill the code to add a newline character to the pattern
    }
    return pattern.toString()
}
/**
 * This exercise focuses on designing patterns using nested loops.
 *
 * Given the width and height of a fabric, you are required to design a specific pattern.
 * Each element of the pattern is represented by a combination of two characters: '+' and '-'.
 * Your task is to complete the code to generate the pattern as per the given width and height.
 *
 * @param width an integer representing the width of the fabric
 * @param height an integer representing the height of the fabric
 * @return A string representing the fabric pattern
 *
 * Examples:
 * designPatterns(3, 3) should return:
 * +++
 * +++
 * +++
 *
 * designPatterns(4, 5) should return:
 * ++++
 * ++++
 * ++++
 * ++++
 * ++++
 */
fun designPatterns(width: Int, height: Int): String {
/**
 * This exercise focuses on designing patterns using nested loops.
 *
 * Given the width and height of a fabric, you are required to design a specific pattern.
 * Each element of the pattern is represented by a combination of two characters: '+' and '-'.
 * Your task is to complete the code to generate the pattern as per the given width and height.
 *
 * @param width an integer representing the width of the fabric
 * @param height an integer representing the height of the fabric
 * @return A string representing the fabric pattern
 *
 * Examples:
 * designPatterns(3, 3) should return:
 * +++
 * +++
 * +++
 *
 * designPatterns(4, 5) should return:
 * ++++
 * ++++
 * ++++
 * ++++
 * ++++
 */
fun designPatterns(width: Int, height: Int): String {

    val pattern = StringBuilder()
    repeat(height) {
        repeat(width) {
            pattern.append("+") // Fill the code to add a '+' character to the pattern
        }
        pattern.append("\n") // Fill the code to add a newline character to the pattern
    }
    return pattern.toString()
}