Arithmetic/Integer: Difference between revisions

Line 106:
putStrLn $ "a * b = " ++ show (a * b)
putStrLn $ "a / b = " ++ show (a `div` b)
 
==[[MAXScript]]==
[[Category:MAXScript]]
x = getKBValue prompt:"First number"
y = getKBValue prompt:"Second number:"
format "Sum: %\n" (x + y)
format "Difference: %\n" (x - y)
format "Product: %\n" (x * y)
format "Quotient: %\n" (x / y)
format "Remainder: %\n" (mod x y)
 
 
==[[Pascal]]==
Anonymous user