Dont display elements with coefficient=0 sign "+" should be showned for coefficients bigger than 0, coefficients 1 & -1, if they are not constant terms, not showned, for -1 only "-" should be displayed, you can display "^" for marking powers of variable x, so polynomial should be showned W(x) = 2 x^4 - x^3 + x^2 -6. in certain case, when all coefficients/all coefficients except constant term are equal 0, you have to display only constant term, for example for array {-1, 0. 0, 0, 0} displayed polynomial is W(x)=-1 2. Create a function, which adds two polynomials (in the same power) and coefficients of received polynomial are saved in 3rd array. 3. Create a function, which subtracts two polynomials (in the same power) and coefficients of received polynomial are saved in 3rd array. 4. Create a function, which multiplies two polynomials (in the same power k) and coefficients of received polynomial are saved in 3rd array. Polynomial which is the result of multiplying should be saved in the array in the size: 2*k+1. 5. In main() declare two static arrays, both in the same size. Initalize them randomly with numbers from interval [-5, 5]. Declare also array for total, difference, and product of polynomials. needed in the program: #include #include #include #define M 10 void totalpolynomials(int * tab1, int * tab2, int *wynik, int n) // n is the size of every array { //score[0] = tab1[0] + tab2[0]; // example of instruction which adds constant terms int main() { srand(time(NULL)); return 0; }

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

Dont display elements with coefficient=0
sign "+" should be showned for coefficients bigger than 0, coefficients 1 & -1, if they are not constant terms, not showned, for -1 only "-" should be displayed, you can display "^" for marking powers of variable x, so polynomial should be showned W(x) = 2 x^4 - x^3 + x^2 -6.
in certain case, when all coefficients/all coefficients except constant term are equal 0, you have to display only constant term, for example for array {-1, 0. 0, 0, 0} displayed polynomial is W(x)=-1
2. Create a function, which adds two polynomials (in the same power) and coefficients of received polynomial are saved in 3rd array.
3. Create a function, which subtracts two polynomials (in the same power) and coefficients of received polynomial are saved in 3rd array.
4. Create a function, which multiplies two polynomials (in the same power k) and coefficients of received polynomial are saved in 3rd array. Polynomial which is the result of multiplying should be saved in the array in the size: 2*k+1.
5. In main() declare two static arrays, both in the same size. Initalize them randomly with numbers from interval [-5, 5]. Declare also array for total, difference, and product of polynomials.
needed in the program:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

#define M 10

void totalpolynomials(int * tab1, int * tab2, int *wynik, int n) // n is the size of every array
{
//score[0] = tab1[0] + tab2[0]; // example of instruction which adds constant terms

int main()
{
srand(time(NULL));


return 0;
}

 

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY