Toggle navigation
HUSTOJ
F.A.Qs
Web Board
ProblemSet
Source/Category
Status
Ranklist
Contest
Recent
Login
Problem1114--判断奇偶性
1114: 判断奇偶性
Time Limit:
1 Sec
Memory Limit:
128 MB
Submit:
6
Solved:
1
[
Submit
] [
Status
] [
Web Board
] [Creator:
]
Description
本题要求实现判断给定整数奇偶性的函数。 函数接口定义: int even( int n ); 其中n是用户传入的整型参数。当n为偶数时,函数返回1;n为奇数时返回0。注意:0是偶数。 裁判测试程序样例: #include
int even( int n ); int main() { int n; scanf(
Input
整数n
Output
整数n
Sample Input
Copy
-6
Sample Output
Copy
-6 is even.
Source/Category