Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

The 20 Line Challenge / Text-mutl operator calculator

Author
Message
Lord Ultemalech
19
Years of Service
User Offline
Joined: 20th Jun 2004
Location:
Posted: 20th Jun 2004 14:30
I made a text Text-mutli operator calculator

after getting darkbasic i made it in 10 mins
Lord Ultemalech
19
Years of Service
User Offline
Joined: 20th Jun 2004
Location:
Posted: 20th Jun 2004 14:31
--------the coding is below----------

Do
if store$ = ""
print "enter first number"
Input num1
endif
Print "enter second number"
input num2
Print "enter operater"
input op$
if op$ = "+" then ans = num1+num2
if op$ = "-" then ans = num1-num2
if op$ = "%" then ans = num1/num2
if op$ = "x" then ans = num1*num2
if op$ = "+" or op$ = "-" or op$ = "%" or op$ = "x" then print ans else print "SYNTAX ERROR"
print "type store to store the answer to num1"
input store$
num1 = ans
loop

Login to post a reply

Server time is: 2024-03-29 15:49:18
Your offset time is: 2024-03-29 15:49:18