#include <iostream>
using namespace std;
int f[33] = {3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54,
57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99};
int b[20] = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85,
90, 95, 100};
int main (){
for (int x=100; x >= 1; x-- ){
if (x == f){
cout << "fizz" << endl;
} else {
if(x ==b){
cout << "buzz" << endl;
}else{
if(x==f & x==b){
cout << "fizzbuzz" << endl;
}else{
cout << x << endl;
}
}
}
}
}
I am still learning, so this may not be the best way to solve this problem. I just want to know wahts wrong with this code. Thanks