Advertisement
Guest User

Untitled

a guest
Mar 1st, 2014
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. for (int i = 0; i < 100; i++)
  8. {
  9. if (i%3 == 0 && i%5 == 0)
  10. cout << "FizzBuzz ";
  11. else if (i % 3 == 0)
  12. cout << "Fizz ";
  13. else if (i % 5 == 0)
  14. cout << "Buzz ";
  15. else
  16. cout << i << " ";
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement