Hey guys, Im having a problem and I was wondering if someone could help me through it. I am student teaching a 12th grade honors math class and I want to show the kids an example of some things you can do with
java and math. I made a few simple examples of easy calculations but I want to show them that you can do some things a little more in depth. Im trying to make a multiplication table using a file and a scanner as well as using multi-dim arrays and I want it to print out nice and clean. Its been a couple years since I took a java class and Im a little rusty.
this is what I have so far:
What Im doing is reading in a simple text file that I made which consists of this:
1-3 4-6
2-4 3-9
I split the tokens at the dash and insert them into a matrix form to make the mult table.
so far I have got it to give me this:
run:
4 5 6
8 10 12
12 15 18
6 8 10 12 14 16 18
9 12 15 18 21 24 27
12 16 20 24 28 32 36
BUILD SUCCESSFUL (total time: 4 seconds)
I want it to give me this:
then another table just like the one above but with rows from 2-4 and columns 3-9.
I know I need to use the printf method I dont know how to use it with the multi-dimensional array.
anything will help
Thanks for the help guys
[ November 21, 2008: Message edited by: Campbell Ritchie ]