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
- 4
Locked
Comments (13)
- Popular
- New
- Old
You must be signed in to leave a comment
David
26 July 2021, 07:33
I used also a while loop but the task is not validated:
"The program should display a 10x10 multiplication table."
I took care of spaces and returns but it's not that..
0
Jaime Padilla
19 April 2021, 18:47
I used one while loop and two if statements
0
Tyler Evans
24 August 2020, 23:04
I am actually quite proud of myself that was hard. if you are stuck. this may help someone but i used a while in a while with two index variables. good luck.
+1
monipuff
25 June 2020, 10:04
One of the situations when using System.out.print() instead of System.out.println() comes in handy...
+3
Ian De Bie Full Stack Developer
24 June 2020, 05:42
technically it said must use a while loop, but not must use two while loops, soooo, yeah...
+1
oli blaustrom
15 November 2019, 18:10
no console for this one? I'm getting the 10 x 10 error but I can't check
0
Cam
11 October 2019, 02:12
Dang what a brain teaser! Good one.
Yeah its a
kinda thing
+3
Ahmed
30 April 2019, 23:00
I really enjoyed this one.
Hint: Inception loop :)
+3
Glenn Meyer
29 October 2019, 01:43
Sure, but you can easily do this with a single loop too. :)
0
hidden #10486986
23 August 2020, 01:35
Can you show the code for making a multiplacation table with a single loop ?
0
Glenn Meyer
10 September 2020, 15:08
Using one while loop, you can make this work by multiplying x by an increasing y value, then resetting y to 1 and incrementing x. Obviously this way doesn't scale very well if you need a LOT of numbers, but for values around 10 or less, iterating by hand isn't terribly tedious or time-consuming.
0
Rishabh roy
23 April 2019, 08:14
anyone please help me
0
Roman
24 April 2019, 06:09
If you need help, describe your question/issue in the HELP section at codegym.cc/help.
0