8 kyu

Grasshopper - Summation

103,071 of 284,958danleavitt0

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:

CreatedAug 17, 2015
PublishedSep 3, 2015
Warriors Trained369404
Total Skips22704
Total Code Submissions539590
Total Times Completed284958
JavaScript Completions103071
Ruby Completions5669
Python Completions85036
CoffeeScript Completions98
Elixir Completions806
PHP Completions5740
C++ Completions17595
C# Completions15008
Java Completions27099
Crystal Completions103
BF Completions198
TypeScript Completions3714
Scala Completions941
Haskell Completions1496
Groovy Completions168
Kotlin Completions2902
NASM Completions157
Julia Completions186
Dart Completions1755
R Completions603
Reason Completions41
Nim Completions124
Racket Completions117
Factor Completions39
Go Completions4901
Clojure Completions437
Elm Completions125
PureScript Completions67
Forth Completions101
C Completions6554
Lua Completions630
CFML Completions47
Erlang Completions173
Fortran Completions103
F# Completions249
PowerShell Completions651
Prolog Completions90
Solidity Completions752
Swift Completions2741
VB Completions463
Shell Completions1225
Objective-C Completions86
Rust Completions2850
Perl Completions220
Raku Completions49
OCaml Completions223
CommonLisp Completions385
Pascal Completions279
Haxe Completions61
COBOL Completions71
D Completions65
SQL Completions1987
Total Stars1667
% of votes with a positive feedback rating91% of 17283
Total "Very Satisfied" Votes14397
Total "Somewhat Satisfied" Votes2575
Total "Not Satisfied" Votes311
Ad
Contributors
  • danleavitt0 Avatar
  • jhoffner Avatar
  • Javatlacati Avatar
  • cris Avatar
  • joh_pot Avatar
  • Unnamed Avatar
  • shadowmanos Avatar
  • hilary Avatar
  • datagram Avatar
  • donaldsebleung Avatar
  • aniametz Avatar
  • Chrono79 Avatar
  • imjasonmiller Avatar
  • kazk Avatar
  • docgunthrop Avatar
  • user4912975 Avatar
  • B1ts Avatar
  • lilsweetcaligula Avatar
  • Blind4Basics Avatar
  • Voile Avatar
  • Madjosz Avatar
  • MaikelNabil Avatar
  • mitron6 Avatar
  • Souzooka Avatar
  • metagn Avatar
  • FArekkusu Avatar
  • monadius Avatar
  • CarbonGrid Avatar
  • hobovsky Avatar
  • mcmlevi Avatar
  • cliffstamp Avatar
  • xavierguihot Avatar
  • stellartux Avatar
  • RobsonMoon Avatar
  • Foobywalla Avatar
  • username0 Avatar
  • user8436785 Avatar
  • ejini战神 Avatar
  • Kacarott Avatar
  • dfhwze Avatar
  • 4500zenja1 Avatar
Ad