package math.repet;

public class Repet05 {
    public static void main(String[] args){
        int a = 4;
        int b = 3;
        int c = a % b;
        System.out.println(c);
        int d = Math.floorMod(a, b);
        System.out.println(d);
        double e = a - Math.floor((double)a / (double)b) * b;
        System.out.println(e);
        //-
        int a1 = 4;
        int b1 = -3;
        int c1 = a1 % b1;
        System.out.println(c1);
        int d1 = Math.floorMod(a1, b1);
        System.out.println(d1);
        double e1 = a1 - Math.floor((double)a1 / (double)b1) * b1;
        System.out.println(e1);
        //-
        int a2 = -4;
        int b2 = 3;
        int c2 = a2 % b2;
        System.out.println(c2);
        int d2 = Math.floorMod(a2, b2);
        System.out.println(d2);
        double e2 = a2 - Math.floor((double)a2 / (double)b2) * b2;
        System.out.println(e2);


    }
}
