Sunday, August 14, 2011

Can someone please help me write an algorithm for this in pseudocode?

Find the largest positive integer that is a perfect square (1, 4, 9, 16, …) that is less than or equal to a number given to you by the user. You may ume that the number is greater than or equal to 1. For example, if the user inputs the number 1 the program should output 1, for 3 the result would be 1, for 9 the result would be 9, for 17 the result would be 16, and so on and so forth.

No comments:

Post a Comment