Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

accesing elements in a matrix

 
Jack Bolton
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys i am coding this Sales program.
The program asks the user for the sales of two weeks.
I want to access the elements of the matrix, so i can make comparations; for example: which sale is the highest sale,etc.
how can i solve this?
thanks for any response

this is the code:
create the matrix

loads the matrix


prints the matrix


[ June 03, 2006: Message edited by: Jack Bolton ]

[ June 03, 2006: Message edited by: Jack Bolton ]
[ June 03, 2006: Message edited by: Jack Bolton ]
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jack Bolton:
...I want to access the elements of the matrix, so i can make comparations; for example: which sale is the highest sale,etc. how can i solve this? ...

I'm not sure I understand the question. In your code to print the matrix, you are accessing the elements.

Your code works fine, but I couldn't resist a little clean-up...
 
Stephen Foy
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont understand what you mean, but if you want to find out the highest elements of the matrix you can:



If you wanted to compare to elements, same day from opposite week for example.

 
Jack Bolton
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic