Created
July 22, 2014 16:16
-
-
Save pogin503/b946cc910c02a4c6b525 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#define FOR(i,a,b) for(int i=(a);i<(b);++i) | |
using namespace std; | |
int main(){ | |
int n; | |
cin >> n; | |
FOR(i, 1, n + 1){ | |
if (i % 15 == 0) cout << "FizzBuzz "; | |
else if (i % 3 == 0) cout << "Fizz "; | |
else if (i % 5 == 0) cout << "Buzz "; | |
else cout << i << " "; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment