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

#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("一時停止"); } |
Commentaires (0)
Laisser un commentaire
Connectez-vous pour commenter
Rejoignez la discussion et partagez vos connaissances avec la communauté
Chargement des commentaires...