Simplest sol in C++


#1

//Simplest solution in C++
vector Solution::fizzBuzz(int A) {
vector s;

for(int i=1;i<=A;i++)
{
    string a;
   if(i%3==0)
   a+="Fizz";
   if(i%5==0)
   a+="Buzz";
   
   if(a=="")
   a=to_string(i);
   
   s.push_back(a);
}
return s;

}