My issue
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
int a;
int b;
a = 15;
b = 35;
if (a%7 == 0 && a%5 == 0 ) {
cout << "The number is divisible by both 5 & 7" << endl;
}
else {
cout << "The number is not divisible by both 5 & 7" << endl;
}
if (b&7 == 0 && b&5 == 0 ) {
cout << "The number is divisible by both 5 & 7" << endl;
}
else {
cout << "The number is not divisible by both 5 & 7";
}
return 0;
}
Learning course: Learn C++
Problem Link: CodeChef: Practical coding for everyone