Hello, I was using pc-basic, and I started to write a simple program, just for exercise, the program asked some numbers and then asked the type of account you wanted, ok the code was working perfectly, but the bills were wrong , for example -1 -1 -1 -1 was giving -2, I was using integer variables, all correct, so why were the beads?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I'm sorry, I don't understand what you are trying to do. If I do PRINT -1-1-1-1 I get -4, as expected. Can you attach the program you're using, and describe exactly what inputs you use, what you expect to happen and what happened instead?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I basically created a calculator, but when I was going to make the sums, subtractions, etc. the value never worked correctly, the program asked for 4 numbers, and then I asked the type of mathematical operation, but the result always goes incorrect
which I basically wrote in the program:
100 print "hello, please say me the first number"
110 input a%
120 print "the second"
130 input b%
140 print "third"
150 input c%
160 print "fourth"
170 input d%
180 print "enter the desired math operation"
input e$
190 if e$="sum" then print a%+b%+c%+d%
program worked perfectly, taking the math part of it to go wrong
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "[CLOSED] General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hello, I was using pc-basic, and I started to write a simple program, just for exercise, the program asked some numbers and then asked the type of account you wanted, ok the code was working perfectly, but the bills were wrong , for example -1 -1 -1 -1 was giving -2, I was using integer variables, all correct, so why were the beads?
Hi, I'm sorry, I don't understand what you are trying to do. If I do
PRINT -1-1-1-1
I get-4
, as expected. Can you attach the program you're using, and describe exactly what inputs you use, what you expect to happen and what happened instead?View and moderate all "[CLOSED] General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
I basically created a calculator, but when I was going to make the sums, subtractions, etc. the value never worked correctly, the program asked for 4 numbers, and then I asked the type of mathematical operation, but the result always goes incorrect
which I basically wrote in the program:
100 print "hello, please say me the first number"
110 input a%
120 print "the second"
130 input b%
140 print "third"
150 input c%
160 print "fourth"
170 input d%
180 print "enter the desired math operation"
input e$
190 if e$="sum" then print a%+b%+c%+d%
program worked perfectly, taking the math part of it to go wrong
The above works fine for me though - see screenshot attached.