Created
May 2, 2020 22:43
-
-
Save donkaban/b5b837a610f58b55e9918e14ecc4fd9b to your computer and use it in GitHub Desktop.
Revisions
-
Kirill A. Shabordin created this gist
May 2, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ #include <iostream> int main() { for(int i=1, c=1, d=1; i<=100; ++i, ++c, ++d) { if(3 == c) c = 0; if(5 == d) d = 0; if(c && d ) std::cout << i; if(!c) std::cout << "Fizz"; if(!d) std::cout << "Buzz"; std::cout <<std::endl; } return 0; } This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ #include <iostream> int main() { for(int i=1, c=1, d=1; i<=100; ++i, ++c, ++d) { if(3 == c) c = 0; if(5 == d) d = 0; if(c && d ) std::cout << i; if(!c) std::cout << "Fizz"; if(!d) std::cout << "Buzz"; std::cout <<std::endl; } return 0; }