int count = 0;
for(int i = 100; i <= 300; i++){
if(i % 3 == 0) && (i % 5 !=0){
cout << i <count ++;
}
}
cout << "个数:" + count <
#include
#include
using namespace std;
int main() {
int st = 100;
int ed = 300; // we assume include 100 but exclude 300
vectorresult;
for(int i=st;iif(i%3==0 && i%5!=0) {
result.push_back(i);
}
}
cout << result.size() << endl;
for(int i=0;icout << result[i] << " ";
}
cout << endl;
return 0;
}