8 kyu

Count the Monkeys!

31,196 of 73,137PG1

Description:

You take your son to the forest to see the monkeys. You know that there are a certain number there (n), but your son is too young to just appreciate the full number, he has to start counting them from 1.

As a good parent, you will sit and count with him. Given the number (n), populate an array with all numbers up to and including that number, but excluding zero.

For example(Input --> Output):

10 --> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
 1 --> [1]
Arrays
Fundamentals
Lists
Algorithms

Stats:

CreatedMar 26, 2016
PublishedMar 26, 2016
Warriors Trained88175
Total Skips1407
Total Code Submissions158891
Total Times Completed73137
JavaScript Completions31196
Ruby Completions2006
Python Completions19068
Haskell Completions635
C# Completions3160
Java Completions7086
Elixir Completions293
CoffeeScript Completions36
Crystal Completions41
C Completions676
NASM Completions28
Julia Completions45
PHP Completions1319
Dart Completions611
Racket Completions40
Go Completions1356
C++ Completions5121
Rust Completions734
Elm Completions81
Factor Completions18
R Completions179
Reason Completions11
Lua Completions206
Clojure Completions163
Swift Completions1520
TypeScript Completions657
Prolog Completions36
Scala Completions47
Total Stars551
% of votes with a positive feedback rating92% of 6796
Total "Very Satisfied" Votes5826
Total "Somewhat Satisfied" Votes845
Total "Not Satisfied" Votes125
Ad
Contributors
  • PG1 Avatar
  • Javatlacati Avatar
  • bkaes Avatar
  • cris Avatar
  • GiacomoSorbi Avatar
  • LazyWolf Avatar
  • donaldsebleung Avatar
  • nbeck Avatar
  • Chrono79 Avatar
  • lilsweetcaligula Avatar
  • wneumann Avatar
  • Voile Avatar
  • mitron6 Avatar
  • FArekkusu Avatar
  • hobovsky Avatar
  • uniapi Avatar
  • stellartux Avatar
  • trashy_incel Avatar
  • rabbit_binary7 Avatar
  • Gianni65 Avatar
  • user8436785 Avatar
  • OshuaJay Avatar
  • ejini战神 Avatar
  • Kacarott Avatar
  • KayleighWasTaken Avatar
Ad