- 2

code

can anybody give me the answer of this question int d=3; int f=2; for(d=10; d>6; d--) { System.out.print(f); f++; }

12th Oct 2020, 2:27 AM
sharan
2 Answers
+ 1
2345
12th Oct 2020, 3:18 AM
Marcelo Anjos
Marcelo Anjos - avatar
+ 1
d=10 inside for change it value, then loop normal. You can shorter your code System.out.print(f++) instead. (And remove the next line the f++).
12th Oct 2020, 3:20 AM
Marcelo Anjos
Marcelo Anjos - avatar