In as few characters as possible, find the value of i^n, given n, a positive integer greater than 0. This should be outputted as a String.
For those that don't know, i is defined such that i^2=-1. So:
This then repeats..
- If your language supports complex numbers, don't use any functions or arithmetic that could work this out.
- Floating point inaccuracies are fine for answers that would return decimals anyway, but integer inputs should give exact results
-5 if you can work the value out where n is also negative
-15 if you can work out the value for any real number (this bonus includes the -5 from the above bonus)