My issue
I write the full code but the code after run shows wrong answer please help someone
My code
#include <stdio.h>
int main(void) {
int a;
int b;
a = 15;
b = 35 ;
if (a%7==0 && a%5==0 ) {
printf("The number is divisible by both 5 & 7\n");
}
else {
printf("The number is not divisible by both 5 & 7\n");
}
if (b%7 == 0 && b%5 == 0) {
printf("The numberis divisible by both 5 & 7 \n");
}
else {
printf("The number is not divisible by both 5 & 7\n");
}
return 0;
}
Learning course: Learn C
Problem Link: CodeChef: Practical coding for everyone