#include <iostream> #include <sstream> #include <string> using namespace std; int main() { stringstream ss; int a = 3; do ss << a << ' '; while ((a += 3) <= 30); cout << ss.str() << '\n'; }