Anonymous user
Arithmetic/Integer: Difference between revisions
→{{header|AWK}}: Fix broken regexp. Add exponentation.
m (→{{header|Icon}} and {{header|Unicon}}: -workswith) |
(→{{header|AWK}}: Fix broken regexp. Add exponentation.) |
||
Line 184:
=={{header|AWK}}==
<lang awk>/^[ \t]*-?[0-9]
print "mod:", $1 % $2 # follows first sign
exit}</lang>▼
print "exp:", $1 ** $2
For division and modulus, Awk should act like C.
=={{header|BASIC}}==
{{works with|QuickBasic|4.5}}
|