would love to help you imbestatjava, but i have no clue what you are trying to do
multiply by numbers by products of 7,8,9 and 1,2,3?
that part is understandable, but what is this?
90, 80, 70, or 10, 20, 30
i don't get what these values have to do with anything
dickersonka
Veteran Poster
1,175 posts since Aug 2008
Reputation Points: 130
Solved Threads: 143
Update: Now I get an error of ".class expected" for:
if(int input = 0);
that's to be expected, remove the ;
stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
Update: Now I get an error of ".class expected" for:
if(int input = 0);
that's to be expected, remove the ;
Wrong answer, the if statement is wrong!
You want to check the statement not assign value...
if(input == 0){
// Then something
}
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
Wrong answer, the if statement is wrong!
You want to check the statement not assign value...
if(input == 0){
// Then something
}
hmmmm ... must be even more tired than I thought to miss that :/
still, the ; shouldn't have been there
stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
if(input == 0){
{
remove one of the {'s
and also: re-check what you're doing here:
else(input == 1);
stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
(input == #);
yes and no.
yes: you do need to do
if(input == valueToCheck)
if it are integers, since you want to compare the value to equality and they're not Objects.
no: you do not want to put the ';' straight after the if. what happens if what is between the brackets is true, is what is behind the if statement, until the first ';' if there are no '{ }'
so, if you would check it like that, and put the ';', you would automatically run the next lines, if the statement was true or not, since the next lines are not dependent on the if.
stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
if(input == 0){
{
...
}
else(input == 1);
...
}
I don't think this approach would always work.
especially not if you copy the errors we pointed out a couple posts above ;) :)
stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433