C 言語における多項式の数値の計算

float型の与えられた値Xに対して、次数n

P(X)= の多項式の数値を計算します。次数 n の多項式の数値を計算する.

#include
#include
#include
main()
{
   float A[30];
   int型N;  
   フロートX; 
   フロートP;  
   printf("Enter Degree" (学位を入力)多項式のN(最大30):");
   scanf("%d", &N);
   printf("X変数の値を入力してください: ");
   scanf("%f", &X);
   for (int i=0;i<=N ;i++)
   {
     printf("係数 A %d を入力してください: ", i);
     scanf("%f", &A[i]);
   }
   P=0.0;
   for (int i=0;i<=N ;i++)
   P +=  A[i]*pow(X,i); 
   printf("X の多項式値 = %.2f: %.2f\n", X, P);
   system("一時停止");
}