# An introduction to arithmetic
a = 2
b = 3
c = 4
answer = a + b
print "a + b = %d"%answer
answer = a - b
print "a - b = %d"%answer
answer = a * b
print "a * b = %d"%answer
answer = a / b
print "a / b = %d"%answer
# Illustration of mathematical hierarchy
a = 2
b = 3
c = 4
answer = a + b * c
print "a = %d, b = %d, c= %d"%(a,b,c)
print "a + b * c = %d\n"%answer
# A more advanced illustration of mathematical hierarchy
a = 5
b = 10
c = 15
answer = a + b / c
print "%d + %d / %d = %d"%(a,b,c,answer)
answer = b * c - a
print "%d * %d - %d = %d"%(a,b,c,answer)
answer = a * b / c
print "%d * %d / %d = %d"%(a,b,c,answer)
answer = (a + c) * b / a
print "(%d + %d) * %d / %d = %d"%(a,c,b,a,answer)
# Illustration of modulus operator
a = 4
b = 8
c = 13
print "%d mod %d = %d"%(b,a,b%a)
print "%d mod %d = %d"%(c,a,c%a)
print "%d mod %d = %d"%(c,b,c%b)
print "The modulus operator is: %"
# Illustration of the unary minus
a = -4
b = 5
c = -6
print "a = %d, b = %d, c = %d\n\n"%(a,b,c)
print " and now\n\n"
a = -a
b = -b
c = -c
print "a = %d, b = %d, c = %d\n\n"%(a,b,c)