Skip to content

Commit

Permalink
Update FizzBuzz.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
sonnynomnom authored Feb 12, 2020
1 parent bafc539 commit acb9ad1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 4-loops/fizzbuzz/FizzBuzz.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// FizzBuzz
// Fizz Buzz 🐝
// Kenny Lin

// Using a while loop:
Expand Down

1 comment on commit acb9ad1

@JakeK34959
Copy link

@JakeK34959 JakeK34959 commented on acb9ad1 Jun 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


var counter : Int

for counter in 0...100 {
 if counter % 3 == 0 {
   if counter % 5 == 0{
   print("fizz buzz")
   } else {
   print("fizz")
   }
 } else if counter % 5 == 0{
   print ("buzz")
 } else if counter % 3 == 0{
   
 } else {
     print (counter)
   }
}

Please sign in to comment.