Q:

Write a R program to multiply two vectors of integers type and length 3

0

Write a R program to multiply two vectors of integers type and length 3.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

x = c(10, 20, 30)
 y = c(20, 10, 40)
 print("Original Vectors:")
 print(x)
 print(y)
 print("Product of two Vectors:")
 z = x / y
 print(z)

Sample Output:

[1] "Original Vectors:"
[1] 10 20 30
[1] 20 10 40
[1] "Product of two Vectors:"
[1] 0.50 2.00 0.75

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now