for (x=5;x<x*2;--x).....how many lines will be printed?..... | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

for (x=5;x<x*2;--x).....how many lines will be printed?.....

Ans 5 That is 5 <10 ,4<8 ,3<6 ,2<4, 1<2 ,.................. The loop will not excute after x become zero.0<0,-1<-2 ×××××

27th Aug 2021, 4:41 PM
Afr Tasnym Fathima
Afr Tasnym Fathima - avatar
2 Answers
+ 6
Thanks for teaching. Probably I mistook x*2 for x*x.
28th Aug 2021, 5:52 AM
Satoshi Hirano
Satoshi Hirano - avatar
+ 2
Satoshi Hirano for the first time I saw yu missed one Is ths que wrong or ans?
27th Aug 2021, 4:45 PM
Afr Tasnym Fathima
Afr Tasnym Fathima - avatar