AMCAT Automata Fix Sample Question-2

Program 2

Power Function

Given Function/method pow need to return the x raised to the power n, with the help of stl function. You are required to fix logical errors in given code.

Note : Use STL Function only similar to power.

 

Input: x = 2.00000, n = 10

Expected Output: 1024.00000

Current output: 10.0000

2 comments on “AMCAT Automata Fix Sample Question-2”