how to check the number is odd or even

hesham

Пользователь
Регистрация
15.11.2018
Сообщения
120
Благодарностей
3
Баллы
18
how to check the number is odd or even
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113
I can only help with C#

C#:
var n = int.Parse(project.Variables["YourProjectVariableName"].Value);

if(n % 2 == 0)
{
    return n + " is an even number";
}
else
{
    return n + " is an odd number";
}
}
 
  • Спасибо
Реакции: hesham

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)