• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to imprement equation in to 2D java code  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,

i have a problem to write the equation in java code , i want to make it in for loop and i also want to count the number
how do i do?
please me!!!

example:


(1) f[1][1]=5.4;
(2) f[2][1]=5.0;
(3) f[3][1]=1.5;

so this is the formula

for k[1][1]=|f[1][1]-f[2][1]|+|f[1][1]-f[3][1]|;

for k[2][1]=|f[2][1]-f[1][1]|+|f[2][1]-f[3][1]|;

for k[3][1]=|f[3][1]-f[1][1]|+|f[3][1]-f[2][1]|;
 
Marshal
Posts: 56610
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You would have to write the equation and algorithm with a pencil and paper. Once you have got it written down, you can work out how to convert that to code.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!