subject
Engineering, 31.12.2019 03:31 chinadoll24

Develop a program that computes the scalar product of two vectors. the program must not accept vectors having different size (in such a case print an error message) for example:

> (scalar-product '# (1 2 3) '#(2 1 1))
7
> (scalar-product '#(1 2 3) '#(1 2 3 4 5))
error: different sizes of vectors!
>

a) write the program in iterative style using the do loop
b) write the program using recursion.

ansver
Answers: 1

Another question on Engineering

question
Engineering, 03.07.2019 14:10
When at a point two solid phase changes to one solid phase on cooling then it is known as a) eutectoid point b) eutectic point c) peritectic point d) peritectoid point
Answers: 3
question
Engineering, 04.07.2019 18:20
Inadequate stores control is not an obstacle to effective work order system. (clo4) a)-true b)-false
Answers: 3
question
Engineering, 04.07.2019 18:20
What is the heat treatment of metals? what is the benefit of it? why and how it's useful? answer in details, do not write by hand.
Answers: 3
question
Engineering, 04.07.2019 19:20
The power source in a certain welding setup generates 3500w that is transferred to the low carbon steel work with a heat transfer factor of 0.85. the melting factor in the operation is 0.45. a continuous fillet weld is to be made with a cross-sectional area of 23 mm2 determine the travel speed at which the welding can be accomplished.
Answers: 3
You know the right answer?
Develop a program that computes the scalar product of two vectors. the program must not accept vecto...
Questions