// For20.swift Copyright (c) Kari Laitinen // http://www.naturalprogramming.com // 2014-09-26 File created. // 2016-08-11 Last modification. // A for-in loop is used in this example program. // C-style for loop is made deprecated in Swift. // ... is called the closed range operator. print( "\n Numbers from 0 to 20 are the following:\n\n ", terminator: "" ) for number_to_print in 0 ... 20 { print( " " + String( number_to_print ), terminator: "" ) } print( "\n" )