🔒 Closed C language patulong po baguhan lang po ako mga master

Status
Not open for further replies.

m a e 0 9

Grasshopper

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
 
Status
Not open for further replies.

About this Thread

  • 0
    Replies
  • 406
    Views
  • 1
    Participants
Last reply from:
m a e 0 9

Online now

Members online
1,073
Guests online
817
Total visitors
1,890

Forum statistics

Threads
2,276,991
Posts
28,973,649
Members
1,229,682
Latest member
JhayPureno13
Back
Top