/**
 * Create a pattern for a fashion design using nested loops.
 *
 * @param height The height of the pattern.
 * @param width The width of the pattern.
 * @return A list of lists representing the fashion design pattern.
 */
fun createPattern(height: Int, width: Int): List<List<Char>> {

    val design = mutableListOf<List<Char>>()

    // Outer loop to iterate over each row
    for (i in 0 until height) {
        val row = mutableListOf<Char>()

        // Inner loop to fill each row with the proper elements
        for (j in 0 until width) {
            if (i == 0 || i == height - 1) {
                row.add('-')
            } else if (j == 0 || j == width - 1) {
                row.add('|')
            } else {
                row.add('*')
            }
        }

        design.add(row)
    }

    return design
}
/**
 * Create a pattern for a fashion design using nested loops.
 *
 * @param height The height of the pattern.
 * @param width The width of the pattern.
 * @return A list of lists representing the fashion design pattern.
 */
fun createPattern(height: Int, width: Int): List<List<Char>> {
/**
 * Create a pattern for a fashion design using nested loops.
 *
 * @param height The height of the pattern.
 * @param width The width of the pattern.
 * @return A list of lists representing the fashion design pattern.
 */
fun createPattern(height: Int, width: Int): List<List<Char>> {

    val design = mutableListOf<List<Char>>()

    // Outer loop to iterate over each row
    for (i in 0 until height) {
        val row = mutableListOf<Char>()

        // Inner loop to fill each row with the proper elements
        for (j in 0 until width) {
            if (i == 0 || i == height - 1) {
                row.add('-')
            } else if (j == 0 || j == width - 1) {
                row.add('|')
            } else {
                row.add('*')
            }
        }

        design.add(row)
    }

    return design
}