1

How do you create a loop that prints the squares of numbers from 1 to 10 in R?

Correct Answer: for (i in 1:10) { print(i^2) }

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: How do you create a loop that prints the squares of numbers from 1 to 10 in R? | Extra Education