<pre name="code" class="html">#include<stdio.h>
int main()
{
int x;
while(1)
{
printf("请输入一个整数:\n");
scanf("%d",&x);
if(x%2!=0)
{
x=x/10;
if(x%2==0)
printf("既有奇数又有偶数\n");
}
else
{
x=x/10;
if(x%2!=0)
printf("既有奇数又有偶数\n");
}
}
return 0;
}