2753 - 判断整除2
判断一个整数能不能被2或者被3整除,若能输出’yes’,反之输出’no’
Input
3
Output
yes
Examples
Input
1
Output
no
Solution C++
#include <iostream> #include <cstdio> using namespace std; int main() { int n; cin>>n; if((n%2==0) || (n%3==0)) { cout<<"yes"<<endl; } else { cout<<"no"<<endl; } return 0; }