C# Numbers game
-
And? What did the debugger show you?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
-
I fixed that error but when I start program and input target value and values I get wrong expression. When I type 100 for target number and numbers 5,8,9,4,20,50 for making expression I get: 5150-(' + w + ')+5355+5150 Instead of: (6-1)*4*5
At the risk of repeating myself:
Quote:
And? What did the debugger show you?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
-
:-D A quick visit with Mr Debug would have shown the OP as well! :laugh:
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
-
I fixed that error but when I start program and input target value and values I get wrong expression. When I type 100 for target number and numbers 5,8,9,4,20,50 for making expression I get: 5150-(' + w + ')+5355+5150 Instead of: (6-1)*4*5
OK. Sit down and listen up. Your'e trying to get everyone here to debug your code for you. That's not going to happen. The debugger is there to debug YOU, to give you a tool to understands how your code works, what it's really doing, to increase your understanding. USE IT. The problem with the code you have is that you didn't write it and have no idea how it's supposed to work. This is where the debugger is an indispensable tool, to better your understanding of how the code works. We can't do that for you.
A guide to posting questions on CodeProject
Click this: Asking questions is a skill. Seriously, do it.
Dave Kreskowiak -
OK. Sit down and listen up. Your'e trying to get everyone here to debug your code for you. That's not going to happen. The debugger is there to debug YOU, to give you a tool to understands how your code works, what it's really doing, to increase your understanding. USE IT. The problem with the code you have is that you didn't write it and have no idea how it's supposed to work. This is where the debugger is an indispensable tool, to better your understanding of how the code works. We can't do that for you.
A guide to posting questions on CodeProject
Click this: Asking questions is a skill. Seriously, do it.
Dave KreskowiakThe amount of time and effort he's putting into avoiding work ... :sigh:
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
-
OriginalGriff wrote:
visit with Mr Debug would have shown the OP
Why bother when you can be a help vampire?
Speed of sound - 1100 ft/sec Speed of light - 186,000 mi/sec Speed of stupid - instantaneous.
Maybe we need a special badge for 'em :laugh:
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
-
Maybe we need a special badge for 'em :laugh:
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
-
I have converted game from pascal to C# but when I start program and type in target value and values for finding that value program gives me error:[^] Pascal source: [Pascal] Moj Broj - Pastebin.com[^] C# Source: [C#] Moj Broj C# - Pastebin.com[^]
if (!uzet[l]) s--; -----Index was outside the bounds of the array--------
This error message tells you that your code try to access an element rgat do not exist in the array
uzet
becauseuzet
us too small. With the debugger, check the size ofuzet
.Patrice “Everything should be made as simple as possible, but no simpler.” Albert Einstein
-
if (!uzet[l]) s--; -----Index was outside the bounds of the array--------
This error message tells you that your code try to access an element rgat do not exist in the array
uzet
becauseuzet
us too small. With the debugger, check the size ofuzet
.Patrice “Everything should be made as simple as possible, but no simpler.” Albert Einstein
ppolymorphe wrote:
rgat
Missed by that much :laugh:
Never underestimate the power of human stupidity RAH
-
Maybe we need a special badge for 'em :laugh:
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
Couldn't find a vampire; will this do? 🦇 🦇 Bat Emoji[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer