My issue
why cannot i use / this sign i think / is used for division and % for division remainder please explain?
My code
#include <bits/stdc++.h>
using namespace std;
int main(){
int N,A,B;
cin>>N>>A>>B;
if(N/A==0&&N/B==0){
cout<<"N is divisible by A and B"<<endl;
}
else if(N/A==0 &&N/B!=0){
cout<<"N is divisible by only A"<<endl;
}
else if(N/B==0 &&N/A!=0){
cout<<"N is divisible by only B"<<endl;
}
else if(N/B!=0 &&N/A!=0){
cout<<"N is divisible by neither A nor B"<<endl;
}
return 0;
}
Learning course: C++ for problem solving - 1
Problem Link: CodeChef: Practical coding for everyone