7 kyu

Everything Is Even

99 of 895WarpSpideR

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 Trained1654
Total Skips24
Total Code Submissions13512
Total Times Completed895
C# Completions99
JavaScript Completions810
Total Stars26
% of votes with a positive feedback rating88% of 307
Total "Very Satisfied" Votes249
Total "Somewhat Satisfied" Votes45
Total "Not Satisfied" Votes13
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