The program should generate all such numbers where X and Y are in the range 1 to 100 using the following guidelines:
Use a loop to generate the value for X in the range 1 to 100.
Now,use a nested loop to generate the values for Y. Your loop should not generate duplicates- for e.g.,(3,4,5) and (4,3,5) are the same.
Calculate the sum of the squares of the value X and Y.
Using the Math.sqrt method.calculate the square root of the above sum.The Math.sqrt method returns a double type.(For e..g, Math.sqrt(13) would return 3.6055…)
Cast the above double value to an integer,say Z. Now,check if the square of this integer is the same as the value from step (c)
If the
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment