Dear all sir,
i'm a begining of java and 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 it by column.how do i do?
please me!!!

example:


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


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

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

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

Well, you make a for loop, just like you suggested.
Loop through all the data, and add/subtract the value from a value that you return.

Start making some code, if you run into problems, we can help you. We wont do your homework.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.