RosettaCodeData/Task/Arithmetic-evaluation/Perl-6/arithmetic-evaluation-2.pl6
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

4 lines
216 B
Raku

say ev '5'; # 5
say ev '1 + 2 - 3 * 4 / 5'; # 0.6
say ev '1 + 5*3.4 - .5 -4 / -2 * (3+4) -6'; # 25.5
say ev '((11+15)*15)* 2 + (3) * -4 *1'; # 768