codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
#include <iostream> using namespace std; int main() { for (int index = 1; index <= 100; ++index) { if (index % 3 != 0 && index % 5 != 0) cout << index; if (index % 3 == 0) cout << "Fizz"; if (index % 5 == 0) cout << "Buzz"; cout << endl; } return 0; }
Private
[
?
]
Run code
Submit