Question: Determine the output of this code snippet: arr < - c ( 6 , 1 2 , 1 5 , 2 1 , 2 3

Determine the output of this code snippet:
arr <- c(6,12,15,21,23,28,30)
result <-0
for (val in arr){
if (val %%3==0)
result = result +1
}
print(result)
Question 16Answer
A.
[1]2328
B.
[1]5
C.
[1]152130
D.
[1]2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!