+ 1

error: expected primary-expression before '<' token

What have I done wrong? the line is if(num >0 && <25) { ... } ... just means I haven't included it. Do I need to for help?

27th Mar 2017, 10:13 PM
Jeremy Hunter
Jeremy Hunter - avatar
4 odpowiedzi
+ 19
You have to write num twice to check the two conditions, like this: if (num > 0 && num < 25)
27th Mar 2017, 10:16 PM
Tamra
Tamra - avatar
+ 2
ooh cheers!
27th Mar 2017, 10:17 PM
Jeremy Hunter
Jeremy Hunter - avatar
+ 2
youcef how do the extra brackets help?
27th Mar 2017, 11:11 PM
Jeremy Hunter
Jeremy Hunter - avatar
+ 1
if((num >0) && (num <25)) { }
27th Mar 2017, 10:23 PM
Joseph Cendy
Joseph Cendy - avatar