\sqrt[n]{expression} creates the nth root syntax but the program is producing a wrong output for the nth root