• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to make this output multiplication using array in java

 
Siti Zulaiha Khasnan
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
example : if input is 2, print the 2 tables in the following format :
1*2 = 2
2*2 = 4
3*2 = 6
4*2 = 8
5*2 = 10
6*2 = 12
7*2 = 14
8*2 = 16
9*2 = 18
10*2 = 20
 
Junilu Lacar
Bartender
Pie
Posts: 6529
21
Java Linux Mac Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see why you even need an array to do that. Just use a for-loop.
 
fred rosenberger
lowercase baba
Bartender
Pie
Posts: 12015
24
Chrome Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Step 1) turn off your computer
Step 2) get paper and pencil
Step 3) write down in English (or any other natural language of your choice) the steps you would give a 10 year old child if they had to do this by hand.
Step 4) revise that list at least 5 times, further simplifying and clarifying the steps each time.

ONLY when you have completed the above should you consider writing a single line of code.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic