8 kyu

Grasshopper - Summation

102,441 of 282,601danleavitt0

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 Trained366333
Total Skips22514
Total Code Submissions535530
Total Times Completed282601
JavaScript Completions102441
Ruby Completions5653
Python Completions84099
CoffeeScript Completions97
Elixir Completions801
PHP Completions5708
C++ Completions17414
C# Completions14892
Java Completions26908
Crystal Completions102
BF Completions197
TypeScript Completions3660
Scala Completions938
Haskell Completions1492
Groovy Completions166
Kotlin Completions2881
NASM Completions156
Julia Completions185
Dart Completions1737
R Completions596
Reason Completions40
Nim Completions122
Racket Completions116
Factor Completions38
Go Completions4837
Clojure Completions436
Elm Completions124
PureScript Completions66
Forth Completions100
C Completions6493
Lua Completions622
CFML Completions46
Erlang Completions171
Fortran Completions101
F# Completions248
PowerShell Completions644
Prolog Completions89
Solidity Completions745
Swift Completions2728
VB Completions459
Shell Completions1212
Objective-C Completions85
Rust Completions2819
Perl Completions218
Raku Completions48
OCaml Completions218
CommonLisp Completions380
Pascal Completions276
Haxe Completions59
COBOL Completions69
D Completions64
SQL Completions1937
Total Stars1661
% of votes with a positive feedback rating91% of 17226
Total "Very Satisfied" Votes14347
Total "Somewhat Satisfied" Votes2569
Total "Not Satisfied" Votes310
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