Swift Program to Demonstrate the ‘For In’ Loop With Range

You are currently viewing Swift Program to Demonstrate the ‘For In’ Loop With Range

Swift program to demonstrate the ‘for in’ loop with range

// Swift program to demonstrate the "for in" loop

import Swift;

// Print number from 10 to 15
for cnt in 10...15 {
    print(cnt)
}

Output

10
11
12
13
14
15

...Program finished with exit code 0
Press ENTER to exit console.

Ranjith

Hi, I'm Manoj a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Reply