Arithmetic/Integer: Difference between revisions

no edit summary
(+ Befunge)
No edit summary
Line 133:
printf(a div b, 'a div b = %p\n');
printf(a mod b, 'a mod b = %p\n');
 
==[[Python]]==
[[Category:Python]]
 
print "Number 1:"
x = raw_input()
print "Number 2:"
y = raw_input()
x = int(x)
y = int(y)
print "Sum: %d" % (x + y)
print "Difference: %d" % (x - y)
print "Product: %d" % (x * y)
print "Quotient: %d" % (x / y)
print "Remainder: %d" % (x % y)
## Only used to keep the display up when the program ends
raw_input( )
 
==[[Scheme]]==
Anonymous user