Need help!!!!! Please please please

Write a boolean function that accepts a positive integer parameter from the caller and returns true if the integer is a perfect square and false if not. Test the functions by writing a main that reads a positive integer, calls the functions to see whether it is a perfect square, and outputs an appropriate message.

Any ideas!?

Thanks!!! Again, I REALLY appreciate it :)
Last edited on
Break large projects into smaller steps.


I would suggest you start by writing a function that takes a positive integer parameter and returns a boolean. You don't have to give it a body, just get that much down.

Then once you have that much... start working on the body of the function. Make it check to see if the integer it was given was a perfect square or not. If it was, return true, otherwise return false.

Then once you have that, call the function from main with some dummy values to make sure that it's working.

Then change main to get the input from the user.

Then you're done.
Topic archived. No new replies allowed.