Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
CLS
DIM number AS INTEGER, answer AS INTEGER, yourname AS STRING
INPUT “Now enter a number:”, number
INPUT “Now your name:”, yourname
PRINT “So “; yourname; “ you wanted to know what is”; number; “ times 5?”
answer = number * 5
PRINT “Well, it is:”; answer
END
I'm getting this error
expected statement and it's on the secound line "yourname AS"
CLS
DIM number AS INTEGER, answer AS INTEGER, UserName AS STRING * 50
INPUT “Now enter a number: ”, number
INPUT “Now your name: ”, UserName
PRINT “So “; UserName; “ you wanted to know what is”; number; “ times 5?”
answer = number * 5
PRINT “Well, it is:”; answer
END
CLS
DIM favoritecolor AS INTEGER
LOCATE 10, 10
PRINT “Please enter your favorite color-number beneath:”
LOCATE 11, 10
INPUT “Yes here:”, favoritecolor
COLOR favoritecolor
PRINT “So your favorite colornumber is:”; favoritecolor
PRINT “Now press a key to proceed”
SLEEP
PRINT “Quitting this program… Please wait 5 seconds”
SLEEP 5
END
It says duplicate defination.
On the first line highliting favoritecolor.
I don't know why either as my code looks ok to me?
Thanks alot guys/girls i will be a regular here for sure.