In ancient times, when robots were few, human children were forced to learn the multiplication table. How cruel! Multiplication tables were written by hand over and over in notebooks. What a waste! We won't sully any paper, and there's no reason to teach you the table. Simply display it on the screen. Here's your secret weapon: the while loop.
Multiplication table
- 6
Locked
Comments (59)
- Popular
- New
- Old
You must be signed in to leave a comment
qaz_gangnam
3 May, 13:25
I see many people solved this with "for", am I supposed to know this already? Are we going to learn this later in this course?
0
Lunita
14 January, 02:36
I got it with a for loop inside a While loop. 2 variables to count and 1 to store the product.
+1
manuelguijarro
1 December 2022, 10:39
for(int j=1; j<=10;j++){
for(int i = 1; i<=10;i++){
System.out.print((i*j) + " ");
}
System.out.println();
}
0
Anonymous #11180958
21 November 2022, 22:23
I took the suggestion of the exercise and created like 10 while loops đ
just tried with nested for loops and its so much shorter
0
niraed
8 October 2022, 23:50
Yo he creado la tabla a partir de un while y dentro un for. Entrar en arrays me parecĂa demasiado avanzado y ni siquiera sĂ© cĂłmo van en Java xD
+2
Farhan Khan
5 February 2022, 18:54
Why does this exercise want us to use loop when we have not been taught loop yet? Can any CodeGym employee answer this question?
+1
John Squirrels Website Admin at CodeGym
7 February 2022, 08:44
The course may contain the tasks-from-the-future.
If you do not have the idea how to solve it now, you can skip it and come back when you cover the lecture.
+1
Elias Daniel Hung
2 July 2021, 23:21
estuve tres dĂas tratando de resolver este ejercicio
0
Elias Daniel Hung
2 July 2021, 23:21
Hay que saber la diferencia entre = y == porque en el condicional if puede presentarse un error
+1
Elias Daniel Hung
2 July 2021, 23:19
yo utilicé dos ciclos for para eso investigué que eran esos ciclos, y algo que se llama algoritmo en Internet
0
Jomar TayactacExpert
19 May 2021, 21:12
This task can be done without using a loop, your code will just be longer. If you'd like to use a loop but haven't learned it yet, simply google it.
+1