Course of Raku / Essentials / Variables and data types essentials / Numbers / Exercises
Sum of numbers from 1 to 100
Problem
Create a program that computes the sum of integer numbers from 1 to 100 (including both 1 and 100) and prints it.
Example
This is what the expected result of the program is (assuming we compute the sum of the numbers from 1 to 10):
$ raku sum1-10.raku
The sum of the numbers from 1 to 10 is 55.Solution
Course navigation
← Solution: The last digit | Solution: Sum of numbers from 1 to 100 →
Translations of this page: English • Deutsch • Español • Italiano • Latviešu • Nederlands • Български • Русский • Українська