Created
September 22, 2018 09:27
-
-
Save rahuldottech/90ec4e65fecddbb5a028d31a65313d81 to your computer and use it in GitHub Desktop.
What I wrote while watching Tom Scott's video. Turned out pretty well. https://www.youtube.com/watch?v=QPZ0pIK_wsc
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 characters
#include<iostream> | |
int main(){ | |
using namespace std; | |
for(int i=1; i<101; i++){ | |
if(i%3==0){ | |
cout<<"Fizz"; | |
} | |
if(i%5==0){ | |
cout<<"Buzz"; | |
} | |
if (i%3 !=0 && i%5 !=0){ | |
cout<<i; | |
} | |
cout<<endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment