From Clomosy Docs
ClomosyAdmin (talk | contribs) No edit summary |
ClomosyAdmin (talk | contribs) No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 29: | Line 29: | ||
<h2> See Also </h2> | <h2> See Also </h2> | ||
* [[System_Library#Math_Functions | Math Functions]] | * [[System_Library#Math_Functions | Math Functions]] | ||
{{#seo:|description= | {{#seo:|title=Odd Using in Clomosy - Clomosy Docs}} | ||
{{#seo:|description=The Odd function in Clomosy determines whether a given number is odd, providing a simple and efficient way to handle such checks in your application.}} | |||
Latest revision as of 11:56, 8 January 2025
function Odd(X: Integer): Boolean;
The Odd function returns true if the given Number is odd (remainder of 1 when divided by 2).
Example
var
i : Integer;
{
for (i = 1 to 9)
if (Odd(i)) ShowMessage('Odd number :'+IntToStr(i));
}
Output:
Odd number : 1
Odd number : 3
Odd number : 5
Odd number : 7
Odd number : 9