// Months.kt Copyright (c) Kari Laitinen // http://www.naturalprogramming.com // 2023-04-29 File created. fun main() { val names_of_months = arrayOf( "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ) print( "\n The first month of year is " + names_of_months[ 0 ] + "." ) print( "\n\n The seventh month, " + names_of_months[ 6 ] + ", is named after Julius Caesar.\n" ) print( "\n Our calendar has " + names_of_months.size + " months. \n" ) for ( month_index in 0 .. 3 ) { val number_of_letters_in_month_name = names_of_months[ month_index ].length print( "\n " + names_of_months[ month_index ] + " is made of " + number_of_letters_in_month_name + " letters: " ) for ( letter_index in 0 .. number_of_letters_in_month_name - 1 ) { print( " " + names_of_months[ month_index ].get( letter_index ) ) } } print( "\n\n" ) }