🔒 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
  • 431
    Views
  • 1
    Participants
Last reply from:
m a e 0 9

Trending Topics

Online now

Members online
1,039
Guests online
5,878
Total visitors
6,917

Forum statistics

Threads
2,354,296
Posts
29,383,171
Members
1,079,406
Latest member
kably0527
Back
Top