Prepare a program to print the square of the number.
Question: Write an interactive Prolog program in which a user enters a positive integer and then displays the power of 2 to that number. For example, if the user enters 4, the program calculates the power 2. Once the result is printed, the program loops and waits for another input. If the user enters a negative number, the program should exit.
Use the c programming language to prepare this program.