mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 14:31:28 +00:00
24 lines
486 B
C#
24 lines
486 B
C#
using System.Collections.Generic;
|
|
|
|
namespace TestNinja.Fundamentals
|
|
{
|
|
public class Math
|
|
{
|
|
public int Add(int a, int b)
|
|
{
|
|
return a + b;
|
|
}
|
|
|
|
public int Max(int a, int b)
|
|
{
|
|
return (a > b) ? a : b;
|
|
}
|
|
|
|
public IEnumerable<int> GetOddNumbers(int limit)
|
|
{
|
|
for (var i = 0; i <= limit; i++)
|
|
if (i % 2 != 0)
|
|
yield return i;
|
|
}
|
|
}
|
|
} |