WAP to check whether a number is divisible by 7 but not by 13.
1 year ago
OOP Java
Compile code:
class Divisibleby7butnotby13{
public static void main(String[] args) {
int n=14,r1,r2;
r1=n%7;
r2=n%13;
System.out.println("Number is exactly divisible by 7: "+n);
System.out.println("Number is not exactly divisible by 13: "+n);
}
}
Output:
Dipti KC
Jan 8, 2023