RosettaCodeData/Task/Roots-of-unity/FutureBasic/roots-of-unity.basic
2023-07-01 13:44:08 -04:00

17 lines
333 B
Text

window 1, @"Roots of Unity", (0,0,1050,200)
long n, root
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
HandleEvents