R Programming: Create a two-dimensional 5×3 array of sequence of even integers greater than 50
R Programming: Array Exercise-7 with Solution
Write a R program to create a two-dimensional 5×3 array of sequence of even integers greater than 50.
Sample Solution :
R Programming Code :
a <- array(seq(from = 50, length.out = 15, by = 2), c(5, 3))
print("Content of the array:")
print("5×3 array of sequence of even integers greater than 50:")
print(a)
Sample Output:
[1] "Content of the array:" [1] "5×3 array of sequence of even integers greater than 50:" [,1] [,2] [,3] [1,] 50 60 70 [2,] 52 62 72 [3,] 54 64 74 [4,] 56 66 76 [5,] 58 68 78
R Programming Code Editor:
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Test your Programming skills with w3resource's quiz.
What is the difficulty level of this exercise?
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics