Jump to content

Arithmetic/Integer: Difference between revisions

m
→‎{{header|AWK}}: Also allow trailing space.
(→‎{{header|AWK}}: Fix broken regexp. Add exponentation.)
m (→‎{{header|AWK}}: Also allow trailing space.)
Line 184:
 
=={{header|AWK}}==
<lang awk>/^[ \t]*-?[0-9]+[ \t]+-?[0-9]+[ \t]*$/ {
print "add:", $1 + $2
print "sub:", $1 - $2
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.