program with while

Hi guys. I need some help. I have a program to write, but i have many questions. program is:

I need to write program who counts total of "a". a=m*m/(n-m) "m" and "n" are inputed from keyboard. "m" changes from 2 to -2 by step h1=-0.5 and "n" changes from 1 to 5 by step h2=1. One more condition is n>=m>0. i need to write this by using while loop and "n" and "m" are integer numbers.

Ok, I have basic idea how it supposed to look. But i have some questions. "m" by changing from 2 to -2 have 9 steps (2; 1.5; 1; 0.5; 0; -0.5; -1; -1.5; -2) and "n" have only 5 steps from 1 to 5. So how I am supposed to write it? Program needs to count every "m". So program counts with "m" and when "n" finishes, for example reaches 5 it starts over by taking n=1?

I am a beginner so it's very difficult for me to understand, I hope you could help me.
Topic archived. No new replies allowed.