Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var n = 1;
- print("Initial Value: \(n)")
- while n <= 6 {
- print("At the beginning of the while loop: \(n)")
- if n > 4 {
- print("n > 4: \(n)")
- // 3 * 6 = 18
- print(3 * n);
- }
- n += 1;
- print("At the end of the while loop: \(n)")
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement