What's new

C & C++ C language patulong po baguhan lang po ako mga master

m a e 0 9

Journeyman

Scalar Multiplication​

Same as vector addition, we need to multiply each of the first vector’s components to that of the 2nd vector’s corresponding components.

Let’s try to create a vector adder using a struct datatype namedvector with components x,y, ,and z. Afterwards, we'll create a scalar multiplication function using 2 vector variables.

Input
-10^7 <= x,y,z <= 10^7 6 int inputs, 3 per line with each input separated by a space
2·2·2
3·4·5

Output
Three int outputs separated by a space
6·8·10
 

Similar threads

Back
Top