Sign in to test your solution.
The deadline for this exercise is at 23:30, which is less than 5 minutes away.
The deadline for this exercise was at 2021-10-13 23:30. You can still submit, but your submissions may not be accounted for.
sum_of_first_n_numbers <- function(n) {
for (i in 1:n) {
sum <- 0
sum <- sum + i
}
return(sum)
}
You can submit as many times as you like. Only your latest submission will be taken into account.
Sign in to test your solution.