Write a function that takes a 2D list(matrix) of 3x3 and ask user to input the values
a) Write a function that takes a 2D list(matrix) of 3x3 and ask user to input the
values
Add two polynomials
Given two polynomials A and B, write a program that adds the given two polynomials A and B
Output
Print the addition of polynomials A and B.
If the degree of polynomial is zero and the constant term is also zero, then just print 0 to represent the polynomial.
Test Case 1:-
Input:-
6
0 -20
1 23
2 30
3 19
4 6
5 17
9
0 -100
5 -89
6 -20
7 -1
1 20
2 4
3 99
4 -45
8 12
Output:-
12x^8 - x^7 - 20x^6 - 72x^5 - 39x^4 + 118x^3 + 34x^2 + 43x - 120
Note :- Need Space between - and + operators
Test Case 2:-
Input:-
4
0 5
1 0
2 10
3 6
3
0 1
1 2
2 4
Output :-
6x^3 + 14x^2 + 2x + 6
Note:- Need Space between - and + operators
Test Case 3:- Test Case 4:-
Input:- Input:-
5 4
0 -2 0 5
3 6 1 0
4 7 2 10
1 -3 3 6
2 -1 4
5 0 -5
0 1 1 0
1 2 2 -10
2 -4 3 -6
3 3 Output:-
4 5 0
Output:-
12x^4 + 9x^3 - 5x^2 - x - 1
Note:- Need Space between - and + operators
We need all 4 test cases can be came when code was run. I want exact outputs for all test cases
Write a program that first requests from the user how many integers will be entered. It then reads
in those integers and calculates and displays the average of the numbers (to the nearest 2
decimal points). It must cater for a scenario where the user enters 0 numbers.
Write a program which requests a number between 1 and 50 from the user. It must repeatedly ask
the user for a number until a valid number is entered.
After receiving a valid number, the program must display all the even numbers smaller than that
number. (If the user enters 11, the numbers 2,4,6,8,10 must be displayed)
Write a program that does the following for 15 students:
Reads in 3 marks for each student (marks must be between 0 and 100)
Calculates and displays the highest mark for each student.
Finds the highest mark for all students
Write a program to create a base class: “Question3”, with protected data member: x (int) and with pure virtual function: “Task ()” [Returns no value and takes no argument]. Create a derived class of “Question3” such as “Sub1” (Derive features in public mode). In sub1, there is a member function in public section: get_data1 () to take input for x, and define Task () in this class to display the reverse of x. [Implement the above program by creating pointer to base in main () function and call the necessary functions].
Create an 'Employee' class with emp_id, emp_name and emp_gender as data members - member function to input the details of employee - member function to output the details of employee. Write a main function to create objects of Employee class. Take the input of 3 different employee from the user and display the details on the console output screen.
You have taken a job with a software user who has contracted your previous employer to develop the system for them. You discover that your company's interpretation of the requirement is different from the interpretation taken by your previous employer. Discuss what you should do such situation. You know that the cost to your current employer will increase if the ambiguities are not resolved. You have also a responsibility of confidentiality to your previous employer.
Write the pseudocode for an application that will:
a) Prompt a user for three numbers.
b) Store the values entered by a user in an array as they are provided by the user.
c) Ask a user if they would like to search for a value:
If the user wishes to search for a value, the user needs to be prompted for a value to search for. If the value is found, a notification needs to be provided to the user.
d) Use a for loop to cycle through the arrays to calculate and display the total of the values stored in the array