Untitled
unknown
csharp
2 years ago
467 B
5
Indexable
namespace Pluralize;
public static class PluralizeTask
{
public static string PluralizeRubles(int count)
{
Console.WriteLine(count);
if ((count % 10 == 1) && (count % 100 != 11)) return "рубль";
else if (count % 10 == 2 && count % 100 != 12) return "рубля";
else if (count % 10 == 3 && count % 100 != 13) return "рубля";
else if (count % 10 == 4 && count % 100 != 14) return "рубля";
else return "рублей";
}
}Editor is loading...