RosettaCodeData/Task/Roots-of-unity/FutureBasic/roots-of-unity.futurebasic
2016-12-05 23:44:36 +01:00

15 lines
289 B
Text

include "ConsoleWindow"
dim as long n, root
dim as double real, imag
for n = 2 to 7
print n;":" ;
for root = 0 to n-1
real = cos( 2 * pi * root / n)
imag = sin( 2 * pi * root / n)
print using "-##.#####"; real;using "-##.#####"; imag; "i";
if root <> n-1 then print ",";
next
print
next