!----- Ex4_2: Complex number ----- REAL :: x COMPLEX :: z INTEGER :: n COMPLEX, PARAMETER :: i = (0.0, 1.0) ! PRINT *,' Input a real number x and an integer n:' READ*, x, n; z = EXP(i*x) PRINT*, z**n PRINT*, COS(n*x), SIN(n*x) END