R_Prac-3.r
Problem Statement
R_Prac-3.r
Print elements of vector using for loop.
Source Code
r
# Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 25 Mar 2026
# Repo: https://github.com/notamitgamer/bsc
# License: MIT
# Print elements of vector using for loop.
sample <- c(1:6)
for(elem in sample) {
print(elem)
}1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
● Author - Amit Dutta · Updated - 25 Mar 2026