I changed a few of the signs to this and I got a real number that doesn't = zero.
Code:
x = (int) (Math.PI+13);
y = (int) (Math.PI * x);
midget = (byte) (x*y);
daniel = (long) (jesus/Math.PI);
answer = (int) (midget * daniel);
System.out.println("Original Answer: " + answer);
I'm gonna see if I can change the signs to equal 42. It would take ages though.
Of course I could always just right System.out.println("42"); but that's cheating.
Edit: I changed it to this:
Code:
x = (int) (Math.PI+13);
y = (int) (Math.PI * x);
midget = (byte) (x/y);
daniel = (long) (jesus*Math.PI);
answer = (int) (midget * daniel);
System.out.println("Original Answer: " + answer);
and got 0 but then on the x/y for midget I changed it to x/y+42, thinking I would get 42, and I got this. 176400. Then I added 42 to the answer and bam! I got 42

But that's still kinda cheating.
So if anyone can figure out how to get 42 by just changing the signs you are a maths ninja.
Edit2: I've got this now:
Code:
public static byte midget;
public static long daniel;
public static int x;
public static int y;
public static int jesus;
public static int god;
public static int answer;
public static int workOut;
public static void main(String[] args) {
x = (int) (Math.PI+13);
y = (int) (Math.PI - x);
jesus = (int) (Math.cos(daniel));
midget = (byte) (x+y);
daniel = (long) (jesus*Math.PI);
answer = (int) (midget * daniel);
workOut = 12*4-6;
System.out.println("Original Answer: " + answer);
System.out.println("Working Out: " + workOut);
}
and it equals 12. All I need to do now is add in 12*4-6 somewhere. But I dont want it to be those numbers just added in, so I'm adding a few methods to get the numbers I need.
Edit3: I'm finally done! Here is the full code

Code:
public class Main {
public static byte midget;
public static long daniel;
public static int x;
public static int y;
public static int jesus;
public static int god;
public static int answer;
public static byte midget2;
public static long daniel2;
public static int x2;
public static int y2;
public static int jesus2;
public static int god2;
public static int answer2;
public static byte midget3;
public static long daniel3;
public static int x3;
public static int y3;
public static int jesus3;
public static int god3;
public static int answer3;
public static int otherAnswer;
public static void six() {
x2 = (int) (Math.PI+13);
y2 = (int) (Math.PI - x2);
jesus2 = (int) (Math.cos(daniel2));
midget2 = (byte) (x2+y2);
daniel2 = (long) (jesus2*Math.PI);
answer2 = (int) (midget2 * daniel2) / 2;
}
public static void four() {
x3 = (int) (Math.PI+13);
y3 = (int) (Math.PI - x3);
jesus3 = (int) (Math.cos(daniel3));
midget3 = (byte) (x3+y3);
daniel3 = (long) ((jesus3-Math.PI));
answer3 = (int) (midget3 + daniel3) * 2;
}
public static void main(String[] args) {
six();
four();
x = (int) (Math.PI+13);
y = (int) (Math.PI - x);
jesus = (int) (Math.cos(daniel));
midget = (byte) (x+y);
daniel = (long) (jesus*Math.PI);
answer = (int) (midget * daniel * answer3 - answer2);
System.out.println("Original Answer: " + answer);
}
}
It equals 42! I'm so proud
