Answers for "whats for loop r"

R
0

for R

x <- c(2,5,3,9,8,11,6)
count <- 0
for (val in x) {
	if(val %% 2 == 0) {
    	count = count+1
	}
}
Posted by: Guest on September-12-2021

Browse Popular Code Answers by Language