Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var yearSuffix1 = "лет";
- var yearSuffix2 = "год";
- var yearSuffix3 = "года";
- bool isYearSuffixIsFirst = remainderOfDivisionBy10 == tenDividerThresholdLow ||
- remainderOfDivisionBy10 > tenDividerThresholdHigh ||
- (remainderOfDivisionBy100 >= hundredDividerThresholdLow &&
- remainderOfDivisionBy100 <= hundredDividerThresholdHigh);
- string yearSuffix = isYearSuffixIsFirst
- ? yearSuffix1
- : remainderOfDivisionBy10 == 1
- ? yearSuffix2
- : yearSuffix3;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement