Created
September 9, 2015 19:19
-
-
Save CarlSmotricz/1cc4ff3adb5cba973c61 to your computer and use it in GitHub Desktop.
A simple Java program demonstrating math with integers.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Ideone | |
{ | |
public static void main (String[] args) | |
{ | |
int A, B, C, D; | |
A = 1; B = 2; C = 3; D = 4; | |
if (A + C == D) D = D - 2; | |
if (2 * D + 4 * A < 10) A = A + 4; | |
if (A + D > 3 * B + C) B = C - A; | |
if (B < C) C = B; | |
System.out.println(A + B + C + D); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment