请列举出所有个位数是6且能被3整除
#include<iostream> using namespace std; void main() { int i; for (i = 1; i <= 9; i++) { if ((i * 10 + 6) % 3 == 0) cout << i * 10 + 6 << endl; } }