0
What is the Difference between if(age < 19) and if(age <= 19)?
8 ответов
+ 8
if(age < 19) is executed when value age is less than 19
but
if(age<=19) is executed when value of age is equal to 19 or less than 19
+ 4
if(age<19) = 18,17,16...
if(age<=19) = 19,18,17,16...
+ 2
< is for less than as <= for less than or equal too
0
if(age < 19) is equal to check if age is less than 19
if(age <= 19) is equal to check if age is less or equal than 19, age can be 19 or less than
0
if(age<19) means if condition is executed when value age is less than 19.if(age<=19) means age value is equal 19 or less.
0
one is inclusive of 19 while other is exclusive of 19...
0
age<19 will consider numbers less than 19 but age<=19 will consider 19 as well as the numbers less than 19
0
if (age <19) it will be true until value of age is 18 or less
if (age <=19) it will be true until value of age is 19 or less