1119: 零起点学算法26——判断奇偶数
1119: 零起点学算法26——判断奇偶数
Time Limit: 1 Sec Memory Limit: 64 MB 64bit IO Format: %lldSubmitted: 2419 Accepted: 1508
[Submit][Status][Web Board]
Description
输入一个整数,判断是奇数还是偶数
Input
输入1个正整数(多组数据)
Output
如果是奇数,输出odd否则输出even(每组数据一行)
Sample Input
2
Sample Output
even
Source
1 #include<stdio.h> 2 int main(){ 3 int x; 4 while(scanf("%d",&x)!=EOF){ 5 if(x%2==0) 6 printf("even\n"); 7 else 8 printf("odd\n"); 9 } 10 return 0; 11 }