Question: Problems Problem 1 (Squared Distance) Write an HMMM program aquared,distance ham t takes four integers zi, ,22,372 representing the coordinates of two points on a
Problems Problem 1 (Squared Distance) Write an HMMM program aquared,distance ham t takes four integers zi, ,22,372 representing the coordinates of two points on a plane and prints the squared Euclidean distance between the two, calculated as (21-22)2 + (yi-y)2. Hints . Read inputs ,r.ro, and so into registers r, r2, rs, and N respectively, call the function f(az,,,) that calculates the desired result in register rs; write the resalt; halt. e In the function fr,s,2) calculate (1 -a)(2)2 in register s; return to the caller
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
