Write an interactive prolog program in which a user enters


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. 

 

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Write an interactive prolog program in which a user enters
Reference No:- TGS0951358

Expected delivery within 24 Hours