What will be the output of the code below: for(i in 1:100) { if(i <= 20) { print (i) } }
Answer: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20
Rationale: The code commands the software that for i lying between 1 and 100, if i is less than or equal to 20, print i. Therefore, the software prints all the numbers less than or equal to 20.
________________________________________________________________________
Please Please up vote this answer. Your up vote is so so valuable to me. Thank you so much. Please.
Get Answers For Free
Most questions answered within 1 hours.