8 kyu

Opposite number

7,817 of 367,806sergioet

Description:

Very simple, given a number (integer / decimal / both depending on the language), find its opposite (additive inverse).

Examples:

1: -1
14: -14
-34: 34
Fundamentals

More By Author:

Check out these other kata created by sergioet

Stats:

CreatedMar 8, 2016
PublishedMar 8, 2016
Warriors Trained418838
Total Skips18191
Total Code Submissions640002
Total Times Completed367806
Ruby Completions7817
JavaScript Completions143789
CoffeeScript Completions244
Python Completions104670
C# Completions19353
Java Completions33663
Haskell Completions2189
Clojure Completions925
C++ Completions21058
PHP Completions7767
Elixir Completions966
C Completions9813
Go Completions6049
Rust Completions3847
TypeScript Completions4003
Swift Completions4266
Lua Completions886
Shell Completions1320
Julia Completions362
Groovy Completions207
Kotlin Completions3060
Crystal Completions110
NASM Completions241
R Completions841
Nim Completions157
OCaml Completions302
Scala Completions855
PureScript Completions69
Racket Completions197
Dart Completions1803
Forth Completions107
VB Completions590
Factor Completions52
CFML Completions72
SQL Completions9693
Elm Completions115
Perl Completions164
COBOL Completions91
D Completions38
Total Stars1294
% of votes with a positive feedback rating85% of 22795
Total "Very Satisfied" Votes17219
Total "Somewhat Satisfied" Votes4104
Total "Not Satisfied" Votes1472
Ad
Contributors
  • sergioet Avatar
  • dnolan Avatar
  • hencethus Avatar
  • bkaes Avatar
  • Beast Avatar
  • Unnamed Avatar
  • GiacomoSorbi Avatar
  • thors Avatar
  • donaldsebleung Avatar
  • Chrono79 Avatar
  • adrian.eyre Avatar
  • SandQueen Avatar
  • nomennescio Avatar
  • Voile Avatar
  • jsd3 Avatar
  • TimmyCodewars Avatar
  • pandanautinspace Avatar
  • Souzooka Avatar
  • arrem Avatar
  • emgordon154 Avatar
  • giannismach Avatar
  • monadius Avatar
  • marh Avatar
  • uglywarthog Avatar
  • hobovsky Avatar
  • FiveCrayFish973 Avatar
  • xavierguihot Avatar
  • user8436785 Avatar
  • ejini战神 Avatar
  • akar-0 Avatar
  • dfhwze Avatar
  • ABS-12 Avatar
  • infinitesolargalaxy Avatar
Ad