8 kyu
Grasshopper - Summation
102,175 of 281,682danleavitt0
Description:
Summation
Write a program that finds the summation of every number from 1 to num (both inclusive). The number will always be a positive integer greater than 0. Your function only needs to return the result, what is shown between parentheses in the example below is how you reach that result and it's not part of it, see the sample tests.
For example (Input -> Output):
2 -> 3 (1 + 2)
8 -> 36 (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8)
Fundamentals
Mathematics
Similar Kata:
Stats:
Created | Aug 17, 2015 |
Published | Sep 3, 2015 |
Warriors Trained | 365038 |
Total Skips | 22403 |
Total Code Submissions | 533894 |
Total Times Completed | 281682 |
JavaScript Completions | 102175 |
Ruby Completions | 5646 |
Python Completions | 83758 |
CoffeeScript Completions | 97 |
Elixir Completions | 800 |
PHP Completions | 5689 |
C++ Completions | 17337 |
C# Completions | 14845 |
Java Completions | 26850 |
Crystal Completions | 102 |
BF Completions | 197 |
TypeScript Completions | 3634 |
Scala Completions | 938 |
Haskell Completions | 1491 |
Groovy Completions | 166 |
Kotlin Completions | 2871 |
NASM Completions | 155 |
Julia Completions | 185 |
Dart Completions | 1733 |
R Completions | 595 |
Reason Completions | 40 |
Nim Completions | 122 |
Racket Completions | 116 |
Factor Completions | 38 |
Go Completions | 4815 |
Clojure Completions | 436 |
Elm Completions | 124 |
PureScript Completions | 66 |
Forth Completions | 99 |
C Completions | 6470 |
Lua Completions | 620 |
CFML Completions | 46 |
Erlang Completions | 171 |
Fortran Completions | 100 |
F# Completions | 248 |
PowerShell Completions | 643 |
Prolog Completions | 89 |
Solidity Completions | 743 |
Swift Completions | 2720 |
VB Completions | 458 |
Shell Completions | 1203 |
Objective-C Completions | 85 |
Rust Completions | 2808 |
Perl Completions | 217 |
Raku Completions | 47 |
OCaml Completions | 218 |
CommonLisp Completions | 379 |
Pascal Completions | 274 |
Haxe Completions | 59 |
COBOL Completions | 69 |
D Completions | 64 |
SQL Completions | 1922 |
Total Stars | 1659 |
% of votes with a positive feedback rating | 91% of 17198 |
Total "Very Satisfied" Votes | 14321 |
Total "Somewhat Satisfied" Votes | 2567 |
Total "Not Satisfied" Votes | 310 |