/**
 * Given a range of indices for a list of strings, concatenate the strings using string formatting.
 *
 * @param start the starting index of the strings to concatenate
 * @param end the ending index of the strings to concatenate
 * @param step the step size for iterating through the string indices
 * @return the concatenation of the selected strings
 *
 * Example:
 * concatenateStrings(0, 5, 2) should return "String0String2String4"
 */
fun concatenateStrings(start: Int, end: Int, step: Int): String {

    // Initialize an empty string to store the concatenation
    var concatenated = ""

    // Iterate over the given range
    for (i in start until end step step) {
        // Format the current string using string formatting and append it to the concatenated string
        concatenated += "String$i"
    }

    return concatenated
}
/**
 * Given a range of indices for a list of strings, concatenate the strings using string formatting.
 *
 * @param start the starting index of the strings to concatenate
 * @param end the ending index of the strings to concatenate
 * @param step the step size for iterating through the string indices
 * @return the concatenation of the selected strings
 *
 * Example:
 * concatenateStrings(0, 5, 2) should return "String0String2String4"
 */
fun concatenateStrings(start: Int, end: Int, step: Int): String {
/**
 * Given a range of indices for a list of strings, concatenate the strings using string formatting.
 *
 * @param start the starting index of the strings to concatenate
 * @param end the ending index of the strings to concatenate
 * @param step the step size for iterating through the string indices
 * @return the concatenation of the selected strings
 *
 * Example:
 * concatenateStrings(0, 5, 2) should return "String0String2String4"
 */
fun concatenateStrings(start: Int, end: Int, step: Int): String {

    // Initialize an empty string to store the concatenation
    var concatenated = ""

    // Iterate over the given range
    for (i in start until end step step) {
        // Format the current string using string formatting and append it to the concatenated string
        concatenated += "String$i"
    }

    return concatenated
}