Que imprima y cuente los múltiplos de 3, desde la unidad hasta un numero que introducimos por el teclado.
#include <iostream> using namespace std; int main() { int max; cin >> max; for (int i = 1; i <= max; i++) if (i % 3 == 0) cout << i << " "; cout << endl; }