# Create a program named my_dotProduct which USING LOOPS calculates the dot product of two vectors

###### Question:

Problem 2: Matrix Vector Operations

a) Create a program named my_dotProduct which USING LOOPS calculates the dot product of two vectors (of dimensions $$1 \times n$$ ) from the keyboard. The program should check the input from the user making sure that the vectors are the right dimensions. If the vectors are not then an error message should be outputted to the user. If the vectors are of the right dimensions then the answer should be outputted to the user. Using your code, complete the following table:

b) Create a program named my_arrayCount which inputs an $$n \times m$$ array and determines (USING LOOPS) how many elements in the array are greater than zero and how many are less than zero. The program should then output the answers. Using your code, complete the following table:

#### Similar Solved Questions

##### At May 31, 2017, the accounts of Lopez Company show the following. 1. May 1 inventories—finished...
At May 31, 2017, the accounts of Lopez Company show the following. 1. May 1 inventories—finished goods $14,300, work in process$17,400, and raw materials $8,800. 2. May 31 inventories—finished goods$9,900, work in process $16,000, and raw materials$7,500. 3. Debit postings t...
##### Whats the effect of phosphorylation on the activity of the following enzymes? 1. glycogen phosphorylase 2....
whats the effect of phosphorylation on the activity of the following enzymes? 1. glycogen phosphorylase 2. glycogen synthase 3. acetyl CoA carboxylase...
##### Suppose that there is incoming demand of 179 units of a certain product at the start...
Suppose that there is incoming demand of 179 units of a certain product at the start of 3, and 91 units of the same product at the start of week 6. Scheduled receipts of 120 are planned for week 2, and 90 for week 5. The product has a lead time of 1 week and must be ordered in batches of s. When, an...
##### E10-33 (similar to) Racing Radars manufactures radar systems. It has just completed the manufacture of its...
E10-33 (similar to) Racing Radars manufactures radar systems. It has just completed the manufacture of its first newly designed system, RS-32. Manufacturing data for the RS-32 follow: E (Click icon to view data) Requirement Calculate the total variable costs of producing 2, 4, and 8 units A Data Tab...
Problem 9-7 WACC Shi Import-Export's balance sheet shows $300 million in debt,$50 million in preferred stock, and $250 million in total common equity. Shi's tax rate is 35%, -7%, -5.7%, and r, 10%. If Shi has a target capital structure of 30% debt, 5% preferred stock, and 65% common stock w... 1 answer ##### Vulcan Company’s contribution format income statement for June is as follows: Vulcan Company Income Statement For... Vulcan Company’s contribution format income statement for June is as follows: Vulcan Company Income Statement For the Month Ended June 30 Sales$ 900,000 Variable expenses 400,000 Contribution margin 500,000 Fixed expenses 470,000 Net operating income $30,000 Management ... 1 answer ##### Of the following five prime numbers which ones could be used to create the Rabin Cryptosystem?... Of the following five prime numbers which ones could be used to create the Rabin Cryptosystem? And why (or why not? 1. 951781 2. 852391 3. 2027 4. 555557 5. 100003 .... 1 answer ##### X Incorrect. Predict the major product(s) for the following reaction: Br 827 H20 Heat 111110H Edit X Incorrect. Predict the major product(s) for the following reaction: Br 827 H20 Heat 111110H Edit... 2 answers ##### (Bond valuation) You own a 10-year,$1,000 par value bond paying 8 percent interest annually. The...
(Bond valuation) You own a 10-year, $1,000 par value bond paying 8 percent interest annually. The market price of the bond is$900, and your required rate of return is 11 percent. a. Compute the bond's expected rate of return. b. Determine the value of the bond to you, given your required rate o...
##### In General Chemistry we learned that the equilibrium constant for a reaction is related to AG,...
In General Chemistry we learned that the equilibrium constant for a reaction is related to AG, for 8. the reaction via AGo RTlnKeq- Given [0(AG/T)/aT]p = -AH/T2 Show that: [ (In Keg Tp-AH (RT)...