Even / odd
C# Branching
if / else
Flowchart (ISO 5807)
Source code
class Program {
static string Parity(int n) {
if (n % 2 == 0)
return "парне";
else
return "непарне";
}
} if / else
class Program {
static string Parity(int n) {
if (n % 2 == 0)
return "парне";
else
return "непарне";
}
}