Haskell, isPerfectSquare

ساخت وبلاگ

Vote count: 0

So i was ask to make a function that determinate if a number is a perfect square but it has a catch they ask me to operate using an auxiliary function that i should write based on this fact:

The first perfect square is 0, to get to the second i need to add up 1 (the second perfect square is 1), to get to the third i need to add up 3 (the third perfect square is 4), and so on ... so the rule is that as you keep adding odd numbers to the previous perfect square you get the next one.

Also they ask me to avoid using operations that involve float numbers.

I wasnt able to make any progress with it i hope someone could help me, thanks.

asked 1 min ago

back soft...
ما را در سایت back soft دنبال می کنید

برچسب : نویسنده : استخدام کار backsoft بازدید : 354 تاريخ : شنبه 29 اسفند 1394 ساعت: 22:57