! Copyright (C) 2009 Anthony Simpson. ! See http://factorcode.org/license.txt for BSD license. USING: io math kernel math.parser.private math.parser present ; IN: testing : get-numbers ( -- n n str ) readln string>number readln string>number readln ; : print-numbers ( n n str -- n ) dup "+" = [ drop + ] [ dup "-" = [ drop - ] [ dup "*" = [ drop * ] [ drop / ] if ] if ] if ; : letsjustcallthismain ( -- ) get-numbers print-numbers present print ; MAIN: letsjustcallthismain