Given an array A a0 a1 a2 an1 of integers let pA be the fol
Solution
#include <bits/stdc++.h>
 #define max 10
 using namespace std;
int main()
 {
 int ar[max];
 int i, num, power;
 float x, result;
 
 cout<<\"Enter the order of the polynomial \ \";
 cin>>num;
 cout<<\"Enter the value of x \ \";
 cin>> x;
 cout<<\"Enter \" <<num + 1<< \"coefficients \ \";
 for (i = 0; i <= num; i++)
 {
 cin>>ar[i];
 }
 result = ar[0];
 for (i = 1; i <= num; i++)
 {
 result = result * x + ar[i];
 }
 power = num;
 
 cout<<\"Polynomial is: \ \";
 for (i = 0; i <= num; i++)
 {
 if (power < 0)
 {
 break;
 }
 
 if (ar[i] > 0)
 cout<<\" + \";
 else if (ar[i] < 0)
 cout<<\" - \";
 else
 cout<<\" \";
 cout<<abs(ar[i])<<\"x^\" <<(power--);
 }
 cout<<\"\  Value of the polynomial = \"<<result;
 }
============================================
Output:
akshay@akshay-Inspiron-3537:~/Chegg$ g++ polynomial.cpp
 akshay@akshay-Inspiron-3537:~/Chegg$ ./a.out
 Enter the order of the polynomial
 2
 Enter the value of x
 2
 Enter 3coefficients
 3
 2
 6
 Polynomial is:
 + 3x^2 + 2x^1 + 6x^0
 Value of the polynomial = 22akshay@akshay-Inspiron-3537:~/Chegg$ subl polynomial.cpp
![Given an array A = [a_0, a_1, a_2, ...a_n-1] of integers, let p_A be the following polynomial: a_n-1 x^1 - 1 + a_n-2x^n-2 + ... + a_2 x^2 + a_1 x + a_0 Give an  Given an array A = [a_0, a_1, a_2, ...a_n-1] of integers, let p_A be the following polynomial: a_n-1 x^1 - 1 + a_n-2x^n-2 + ... + a_2 x^2 + a_1 x + a_0 Give an](/WebImages/38/given-an-array-a-a0-a1-a2-an1-of-integers-let-pa-be-the-fol-1115257-1761592257-0.webp)
![Given an array A = [a_0, a_1, a_2, ...a_n-1] of integers, let p_A be the following polynomial: a_n-1 x^1 - 1 + a_n-2x^n-2 + ... + a_2 x^2 + a_1 x + a_0 Give an  Given an array A = [a_0, a_1, a_2, ...a_n-1] of integers, let p_A be the following polynomial: a_n-1 x^1 - 1 + a_n-2x^n-2 + ... + a_2 x^2 + a_1 x + a_0 Give an](/WebImages/38/given-an-array-a-a0-a1-a2-an1-of-integers-let-pa-be-the-fol-1115257-1761592257-1.webp)
