How to Print Out the Square Root of A Negative Number with i Displayed in C
问题 I am trying to figure out how to display the square root of a number if it happens to be negative (as it is entered by the user), and if so, display it correctly with the "i" displayed as well. When I do the normal sqrt function, the result is always something like -1.#IND. When I tried using the double complex variables, the positive numbers nor the negative numbers would come out clean. Below is my code; the comments are what my goal is. The 4 num variables are entered by the user and can