Write a python program that prompts user to enter two integers x and y. The program then calculates and displays x^y.

                               

Write a python program that prompts the user to enter two integers x and y. The program then calculates and displays x^y.


PROGRAM:

x=int(input("Enter x:"))
y=int(input("Enter y:"))
p=x**y
print("x^y:",p)

OUTPUT:

No comments:

Post a Comment




Copyright Ⓒ 2022 | Mechpedia | All Right Reserved.