I'm dumb, I just had to not put a string on the variable that saves the number. I'm glad I asked though, because it's much easier to gather the input with the FOR NEXT loop, which I completely forgot about since it's been a while since I made a lot of QBASIC programs (not like I knew a lot anyway). You might remember me from
this topic, I certainly remember you. That was the last time I programmed something. By the way, I didn't see your last message there, but I didn't have a problem with SLEEP. Basically I added a DO LOOP that kept the program running unaltered until you press Esc, which ends the program. I got a bit offtopic here
On to the topic, the actual converter was easy to do once I could atribute the input letters their Arabic values. I just had to sum up all the values and then check if there was a number at the right greater than one adjacent at the left, for all the numbers. If that's the case, it just deducts the smaller number twice from the total amount (one to fix the previous sum and one to do the actual deduction).
Code: Select all
IF r1 < r2 THEN r0 = r0 - (2 * r1)
All in all it was a nice code to work on, I made all of it today because I missed the challenge of creating a functional program.
Thanks for your help.