1

What is the output of the following R code: x <- 5; while (x > 0) { print(x); x <- x - 2 }

Correct Answer: 5, 4, 3, 2, 1

Make the most of this question

This page focuses on one R Programming MCQs question from Programming. After checking the answer, return to the topic list to practice more or run a timed set.

R Programming MCQs MCQ: What is the output of the following R code: x 0) { print(x); x <- x - 2 } | Extra Education