Skip to content

Instantly share code, notes, and snippets.

@dgw dgw/Q1P3.java
Created Oct 18, 2011

Embed
What would you like to do?
Problem 3, Quiz 1, COSI 11A (Fall 2011), Brandeis University
/* ******************************** *\
* Package Name: Q1P3 *
* Description: The code from Quiz *
* 1, Problem 3 in the Fall 2011 *
* COSI 11A course at Brandeis. *
* Purpose: Demonstrating how the *
* given expressions really eval. *
\* ******************************** */
public class Q1P3 {
public static void main(String[] args) {
int a = 5;
int b = 10;
int c = b;
a = a++;
b = --b;
c += a - (c--);
// The moment of truth
System.out.printf("a = %d\nb = %d\nc = %d\n", a, b, c);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.