Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Array help

 
Marcus Wright
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to do an exercise outta my text, and i have run into a brick all.... i really dont know what it is im doing wrong

I want to multiply the array[0][1] by array[1][0] and place it into array[1][1] but it just prints out the original array i created instead of the one with the math performed on it.... am i doing something wrong witht he way i initialize the array or is my math just wrong... i know its probably something simple... but its kinda frustrating.

heres the code


I know its a little sloppy but im a beginner, please be gentle!
 
Marcus Wright
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hahaha, when i looked at it on the forum, it struck me its using the length of the array as terminator... d'oh

If you read this sorry :P



working wow that was really satisfying lol


output as


Process completed.

 
Mohamed Sanaulla
Saloon Keeper
Pie
Posts: 3159
33
Google App Engine Java Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please UseCodeTags in future for posting the code, that way the code looks more readable.
 
Mohamed Sanaulla
Saloon Keeper
Pie
Posts: 3159
33
Google App Engine Java Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And this time I have added the code tags for you. The code tags also maintain the indentation you had for your code.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic