+ 1
Did I mess something up here?
I finished another part of my code and I dont understand what the output means by cannot find symbol. Did I code something wrong here? Please help, the part that's the issue is the non-commented code towards bottom https://code.sololearn.com/cXm0btZi9v6D/?ref=app
16 odpowiedzi
0
This works (if i'm right)
https://code.sololearn.com/cA0n15NL0Em7/?ref=app
+ 2
This is the code how I want to run it, with everything there
+ 2
It just shows as 0.0 in the output text
+ 2
Ohh, I see it now, I got it working then. Thank you so much for the help
+ 2
Thanks, I'm making it for work to make figuring orders easy lol. I'm very new to coding though, just using the basics I've learned so far, which isnt much lol
+ 1
My inputs are:
bi-folder
2
4
no
4
70
24
+ 1
I just fixed it so you can run it with my inputs to see the output. I dont understand because it says the error is on line 77. Which is in comments..
+ 1
If you run it with the input how I put it. It gives errors. Please help
https://code.sololearn.com/cK4w2x02nqzV/?ref=app
+ 1
This is with nothing commented
+ 1
It works, what did you change if I may ask? The only issue is on line 147. It didnt assign 'double lastpnlfc' to the value of 'lastpanelwidth + foam + 0.5
+ 1
Ohhh, okay, how come it is showing up as 0.0 though if I have it changing the variable?
0
I think the problem was that you were calling a local variable outside its local environment, this returns the 'symbol not found' error which basicly means you tried to use a variable that wasn't declared. I haven't read the whole code so I might be wrong
0
Declare every variable right after main() or declare them with the inputs. You also have to get rid of most of the 'double' declarations, since they are already declared
0
double lastpnlfc = 0;
double lastpnlbk = 0;
double samevinylsizes = 0;
double firstpanelvelcro = 0;
These are variables defined before their usage
if(panels == 1) {
samevinylsizes = 0;
} else if(panels == 3) {
samevinylsizes = 4;
} else if(panels == 5) {
samevinylsizes = 8;
} else if(panels == 7) {
samevinylsizes = 12;
}
Notice how there aren't any double declarations, this is because we defined them before and thus don't need another declaration
You defined a diffrent variable every time you checked the if's, these are local variables and don't work outside their curly brackets
0
Lastpnlfc is autodefined as 0. This changes on line 141, but this line is never run because lastpnlwidth equals 24. So lastpnlfc stays 0
has it to be 26.5?
0
Good luck with your code