编程读入两个整数,判断第一个数能被第二个数整除,用求余运算符
哪地方不会啊?
#include <iostream> using namespace std; int main() { int a,b; cin>>a>>b; if(a%b==0) cout<<a<<"能被"<<b<<"整除"<<endl; else cout<<a<<"不能被"<<b<<"整除"<<endl; return 0; }