判断一个数是不是3的倍数,如果是打印yes,否则打印no
一行,一个整数
一行,yes或者no
3
yes
#include <iostream> #include <cstdio> using namespace std; int main() { int x; cin>>x; if(x%3 == 0) { cout<<"yes"<<endl; } else { cout<<"no"<<endl; } return 0; }