Calculate the Sum of Natural Numbers

# Introduction In this lab, you will create a program to find the sum of the first `N` natural numbers by getting an input for `N`, initializing a variable `sum` with `0`, using a `for` loop to iterate from `1` to `N`, updating `sum` by adding it to `i`, and finally printing the value of `sum`.

|
60 : 00

Click the virtual machine below to start practicing