Answer:
Step-by-step explanation:
var n : integer;
function IsEvenOdd (n : integer): boolean;
begin
if odd (n) then Result := true
else Result := false;
end;
Write (' n = '); ReadLn (n);
WriteLn (' ', IsEvenOdd (n));
end.
#include <bits/stdc++.h>
typedef std::string s;
s isEvenOdd(int n) {
return (n%2==0) ? "Even" : "Odd";
}
int main(int argc, char* argv[]) {
int x; std::cin>>x;
std::cout << isEvenOdd(x) << std::endl;
return 0;
1.6m questions
2.0m answers