不多说了,看代码
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
int main()
{
int n;
scanf("%d", &n);
double x1, x2, x3;
x1 = pow((1.0000000000000 + pow(5.0000000, 0.5)) / 2.0000000, 1.0000000 * n);
x2 = pow((1.0000000000000 - pow(5.0000000, 0.5)) / 2.0000000, n * 1.0000000);
x3 = (x1 - x2) * 1.000000 / (pow(5.000000, 0.5));
printf("%.2f", x3);
}