+ 1
Variable
How to make a variable between 100 and 101 to alert you that you have 101 points? Sorry for my English but i'm from Poland
5 Answers
+ 5
It depends on particular programming language, but I think if-clause could do it.
if (points > 100)
alert();
A moĆŒesz teĆŒ zapytaÄ polski, trochÄ rozumiem :)
+ 3
To co napisaĆem zadziaĆa gdy masz wiÄcej niĆŒ 100 (to jest 101, 102, 103 i tak dalej).
if (points == 100)
alert();
Alert zadziaĆa tylko gdy masz 100.
if (points == 100 || points == 101)
alert();
Alert zadziaĆa gdy masz 100 lub 101. "||" znaczy w Jave OR (lub).
+ 3
Nie ma limit.
Ale dobry programista nie napisze dĆugiego kodu, uĆŒyje czegoĆ mÄ
drzejszego. Na przykĆad > i < lub jakiĆ cykl.
+ 1
Ok dziÄki ale chcÄ ĆŒeby alert zadziaĆaĆ tylko gdy mam 100 lub 101 punktĂłw.
Bo to co napisaĆeĆ to jest
gdy masz mniej punktĂłw niĆŒ 100 to alert()
+ 1
aha a ile mogÄ daÄ tych "||"?
Jest jakiĆ limit?