Question: What is the result of executing this code? data < - c ( 5 , 1 0 , 1 5 , 2 0 , 2

What is the result of executing this code?
data <- c(5,10,15,20,25)
count <-0
for (d in data){
if (d %%5==0 && d <=20)
count = count +1
}
print(count)
A.
[1]5
B.
[1]2
C.
[1]3
D.
[1]4

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!