#include <stdio.h>
const int MAX_TERMS = 100;
struct term {
int coefficient;
int exponent;
};
int main() {
term polynomial[MAX_TERMS];
int terms, i;
printf("Enter the number of terms in the polynomial: ");
scanf("%d", &terms);
for (i = 0; i < terms; i++) {
printf("Enter the coefficient and exponent of term %d: ", i + 1);
scanf("%d %d", &polynomial[i].coefficient, &polynomial[i].exponent);
}
int coefficients[terms];
int exponents[terms];
for (i = 0; i < terms; i++) {
coefficients[i] = polynomial[i].coefficient;
exponents[i] = polynomial[i].exponent;
}
printf("\nThe two-dimensional representation of the polynomial is: \n");
printf("Coefficients: ");
for (i = 0; i < terms; i++) {
printf("%d ", coefficients[i]);
}
printf("\nExponents: ");
for (i = 0; i < terms; i++) {
printf("%d ", exponents[i]);
}
return 0;
}