Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
min TEST 1
#5
I tried writing the code in n7:
Code:
function demo()
    a = "math expressions "
    b = (10 + 1*2 + (4 + 5)*2)*3 - int("111")
    pln "Test " + a + b
    if 0*|5 > -2|*0 write "True"
    else write "False"
    x = 0
    while x < 20
        if not x < 10 break
        write "."
        x = x + 1
    wend
endfunc
pln "Hello World!"
demo()

pln
system "pause"

But I'm not sure if a |<expr>| is the same thing as 'abs' in the language you're using or if there is implicit multiplication where you write "0|5 >= -2|0". Anyhow, I get the output:

Hello World!
Test math expressions -21
False..........

But since it's a trick question I assume that's not the answer Big Grin
Reply


Messages In This Thread
min TEST 1 - by aurel - 02-16-2024, 02:13 PM
RE: min TEST 1 - by johnno56 - 02-16-2024, 09:33 PM
RE: min TEST 1 - by Tomaaz - 02-16-2024, 09:56 PM
RE: min TEST 1 - by 1micha.elok - 02-16-2024, 10:57 PM
RE: min TEST 1 - by Marcus - 02-17-2024, 07:02 AM
RE: min TEST 1 - by aurel - 02-17-2024, 07:46 AM
RE: min TEST 1 - by aurel - 02-18-2024, 11:46 AM
RE: min TEST 1 - by 1micha.elok - 02-18-2024, 11:58 AM
RE: min TEST 1 - by aurel - 02-18-2024, 06:22 PM

Forum Jump:


Users browsing this thread: 6 Guest(s)