7 kyu

Everything Is Even

817 of 902WarpSpideR

Description:

Here at Conformity Inc. we only like even things. We need you to put a stop to anything that does not conform to our strict even only policy.

Write a function that will convert any number to its nearest even number. When the number is halfway between two even numbers it should round away from zero.

Examples

1 => 2

0.5 => 0

-1 => -2

-0.5 => 0

Fundamentals
Mathematics

Stats:

CreatedSep 19, 2017
PublishedSep 19, 2017
Warriors Trained1665
Total Skips24
Total Code Submissions13555
Total Times Completed902
C# Completions100
JavaScript Completions817
Total Stars25
% of votes with a positive feedback rating88% of 309
Total "Very Satisfied" Votes249
Total "Somewhat Satisfied" Votes46
Total "Not Satisfied" Votes14
Total Rank Assessments10
Average Assessed Rank
7 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • WarpSpideR Avatar
  • JohanWiltink Avatar
  • Voile Avatar
  • hobovsky Avatar
Ad