0
why we use x& y values here for printing hi there ???
example int x=3 int y=2 if (x<y)..... print "hi there"
4 Answers
+ 1
Just to make a decision based on the condition x<y
+ 1
int x=3 // x is a variable ( identifiers ) , variables are used to hold the value so here x is holding an integer value i.e 3
int y=2 // here y is a variable
if (x<y)..... print "hi there"
//here you're checking the condition whether x which is holding the value 3 is less than y ( 2 ) or not... so the condition is false.. therefore it won't print anything..
+ 1
its just a variable name, its used for varying values.
if fixed vslues as 3 and 2 u can use direct those only as
(3<2)
0
thank you