8 kyu

Opposite number

142,559 of 363,561sergioet

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 Trained413998
Total Skips17968
Total Code Submissions633118
Total Times Completed363561
Ruby Completions7797
JavaScript Completions142559
CoffeeScript Completions243
Python Completions102979
C# Completions19132
Java Completions33332
Haskell Completions2175
Clojure Completions918
C++ Completions20731
PHP Completions7709
Elixir Completions960
C Completions9711
Go Completions5944
Rust Completions3789
TypeScript Completions3917
Swift Completions4234
Lua Completions868
Shell Completions1290
Julia Completions361
Groovy Completions205
Kotlin Completions3038
Crystal Completions108
NASM Completions237
R Completions838
Nim Completions155
OCaml Completions298
Scala Completions849
PureScript Completions66
Racket Completions195
Dart Completions1762
Forth Completions105
VB Completions583
Factor Completions51
CFML Completions71
SQL Completions9574
Elm Completions113
Perl Completions159
COBOL Completions88
D Completions36
Total Stars1284
% of votes with a positive feedback rating85% of 22694
Total "Very Satisfied" Votes17141
Total "Somewhat Satisfied" Votes4085
Total "Not Satisfied" Votes1468
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