Advertisement
Larme

Untitled

Jun 22nd, 2020
377
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.27 KB | None | 0 0
  1. var n = 1;
  2. print("Initial Value: \(n)")
  3. while n <= 6 {
  4.     print("At the beginning of the while loop: \(n)")
  5.     if n > 4 {
  6.         print("n > 4: \(n)")
  7.         // 3 * 6 = 18
  8.         print(3 * n);
  9.     }
  10.     n += 1;
  11.     print("At the end of the while loop: \(n)")
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement