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