numbers <- c(4, 9, 15, 22, 7, 3) for (n in numbers) { if (n %% 2 != 0) { cat("Found the first odd number:", n, "\n") break } }
Click Run to execute this code.