package Jade.Testcases;

class adder {

    public static void main(String argv[])
    {
	test(1,0,1);
    }

    public static void test(int a, int b, int c)
    {
	int s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;
	int z, cn;

	s1 = and(b,c);
	s2 = and(a,c);
	s3 = and(a,b);
	s4 = or(s1,s2);
	cn = or(s3,s4);

	s5 = not(a);
	s6 = and(b,s5);
	s7 = not(b);
	s8 = and(a,s7);
	s9 = or(s6,s8); 

	s10 = not(s9);
	s11 = and(c,s10);
	s12 = not(c);
	s13 = and(s9,s12);
	z = or(s11,s13);	
    }
	
    static int not(int x)
    {
	int r;
	if (x > 0)
	    r=0;
	else
	    r=1;
	return r;
    }

    static int and(int x, int y)
    {
	int r;
	if (x > 0) {
	    if (y > 0)
		r=1;
	    else
		r=0;
	}
	else
	    r=0;
	return r;
    }

    static int or(int x, int y)
    {
	int r;
	if (x > 0)
	    r=1;
	else {
	    if (y > 0)
		r=1;
	    else
		r=0;
	}
	return r;
    }
}
