Hello how can i check the divisibility of a number without using % / +...
I am new at coding so hope someone can help
I think my code sucks ..i read forums and this is the best i can do
import java.util.Scanner;
public class Divbythree {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("Enter A Number");
Scanner keyboard =new Scanner(System.in);
int Numero = keyboard.nextInt();
int newNumero = Numero;
while (newNumero > 0){
newNumero -= 3;
System.out.println("1");
//return newNumero == 0;
}
while (newNumero < 0){
newNumero += 3;
System.out.println("2");
}
}
}