Integer division and remainder with negatives
Predict the outputEasyJava only
public class Main {
public static void main(String[] args) {
System.out.println(7 / 2);
System.out.println(7 % 3);
System.out.println(-7 / 2);
System.out.println(-7 % 3);
System.out.println(7 % -3);
}
}
Graded by exact match. Spaces at the ends of lines and blank lines at the end do not count.
to answer and keep your progress. Reading is free for everyone.