最佳答案:可以用库函数pow来表示。即pow(-1, n);函数原型:double pow(double x, double y);功 能:计算x^y返 回 值:计算结果举例:double x=-1, n=4,