diff --git a/.all-contributorsrc b/.all-contributorsrc index 38f70015..ca9354f3 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -308,6 +308,16 @@ "doc", "code" ] + }, + { + "login": “swapnil-satpathy", + "name": “Swapnil Satpathy", + "avatar_url": "https://avatars2.githubusercontent.com/u/54858475?s=460&u=26d2adf4592c6517f58ac87edadf4eb3bc06edba&v=4", + "profile": "https://github.com/swapnil-satpathy", + "contributions": [ + "doc", + "code" + ] } ] } diff --git a/Day1/C++/fizzBuzzSwapnil.cpp b/Day1/C++/fizzBuzzSwapnil.cpp new file mode 100644 index 00000000..f62fed09 --- /dev/null +++ b/Day1/C++/fizzBuzzSwapnil.cpp @@ -0,0 +1,40 @@ + +/* +Author: Swapnil Satpathy +Date: 03/10/2020 + +*/ + + + +#include +using namespace std; + + + +int main(){ +cout<<"Please enter a number"<>A; + +vector soln; + +for(int i=1;i<=A;i++){ + +if(i%3==0 && i%5==0) + soln.push_back("FizzBuzz"); +else if(i%3==0) + soln.push_back("Fizz"); +else if(i%5==0) + soln.push_back("Buzz"); +else + soln.push_back(to_string(i)); + + +} +for(int i=0;i