im trying to correct the code, but unfortunately can't move on due to this error: declaration terminated incorrectly. Please help..
if x>25.0{
y=x
else
y=z;;}
if-else declaration terminated incorrectlycorrect the syntax error
Page 1 of 1
1 Replies - 497 Views - Last Post: 10 August 2009 - 12:02 PM
Replies To: if-else declaration terminated incorrectly
#2
Re: if-else declaration terminated incorrectly
Posted 10 August 2009 - 12:02 PM
f.noces, on 10 Aug, 2009 - 10:51 AM, said:
im trying to correct the code, but unfortunately can't move on due to this error: declaration terminated incorrectly. Please help..
if x>25.0{
y=x
else
y=z;;}
if x>25.0{
y=x
else
y=z;;}
Uhm, those brackets and ; is all over the place!
Use
if(x>25.0) y=x; else y=z;
or
if(x>25.0) {
y=x;
} else {
y=z;
}
Feel free to mess me on MSN Live if you need more help. I'm bored.
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote



|