Why is the Loops example when loops have not been covered yet?
While Loop why now?
Under discussion
Comments (5)
- Popular
- New
- Old
You must be signed in to leave a comment
host_
10 June 2019, 21:53
forgot afre first cycle "for (int i =1; i <= 10; i++){ System.out.print(i + " "); }"
0
Dorin Miron
7 March 2019, 10:26
public class Solution {
public static void main(String[] args) {
//write your code here
for(int i =1;i<=10;i++){
for(int j =1;j<=10;j++){
System.out.print(j*i+ " ");
}
System.out.println(" ");
}
}
}
+2
Thope pavan
4 June 2019, 08:14
i have small doubt abt second System.out.println(" ");
explain it plz
0
Mateo
6 March 2019, 18:30
Research how for loop works, try to print 10 numbers from 1 to 10. If you can't solve it skip it and return later. Wouldn't recommend manual calculation since its too much work.
0
carlos oliveira
3 March 2019, 10:28
Hi Arun. While Loop why now? I didn't see other way to do it better.
The other way you should manual calculate all that table and print it.
And i hate type to much code for simple solution. In a reality i had use this technics in other programs languages. but don't worry programming is just a day-by-day activity. you will get there. Look, everything has its own time to master, even the simple ones. I am here learning the same as you are. but remember, to always try to simplify and make more efficient your code, at the end it will count alot. Start readind the books they mention here. it will help you alot on your course. ok. . fell free for any questions. :)
+3