Question
This is C++ problem Please write codes clear for the problem below. Do not use C language. Problem 1. Write a program using pointers and
This is C++ problem
Please write codes clear for the problem below.
Do not use C language.
Problem 1.
Write a program using pointers and functions to implement multiplication of two vectors A and B as shown below: =
Where,
1xm
mx1
The program should satisfy the following requirements:
-The program should be capable of performing multiplication of two vectors of max size 10. The user should specify the length of the vectors (one length for both vectors).
-The vector A should be considered as a row vector (1 x m) whereas vector B should be considered as a column vector (m x 1) and the product c should be a scalar.
-Individual functions should be implemented to perform data input, data display and the multiplication. Data display should display the vectors appropriately as a row or column.
-The program should use pointers to access the individual elements of the vector in each function.
-The program should only implement the following operations in the main() function
-Definition of the variables and user input of desired size with appropriate checks
-Calling of functions
-Displaying the product.
-The program should use procedural programming only, not object-oriented programming.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started