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"

27th Jul 2016, 6:05 AM
Manish Pant
Manish Pant - avatar
4 Answers
+ 1
Just to make a decision based on the condition x<y
27th Jul 2016, 7:03 AM
chaitanya guruprasad
chaitanya guruprasad - avatar
+ 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..
27th Jul 2016, 9:52 AM
Karan Luther
Karan Luther - avatar
+ 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)
30th Jul 2016, 11:42 AM
Mahantesh AT
Mahantesh AT - avatar
0
thank you
27th Jul 2016, 11:35 AM
Manish Pant
Manish Pant - avatar