Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- void mostrarPolinomio(float p[10], int tam);
- int main()
- {
- float pol[6] = {3, -2, 1.2, 9, -3, 11};
- float d1[5];
- int grau = 5, p = 5, i;
- for (i=0; i < grau; i++){
- d1[i] = pol[i] * p;
- p--;
- }
- mostrarPolinomio(pol,6);
- printf("\n");
- mostrarPolinomio(d1,5);
- }
- void mostrarPolinomio(float p[10], int tam){
- int grau = tam - 1, i;
- for (i=0; i<tam; i++){
- printf("%.2fx^%d ", p[i], grau);
- grau--;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement