#include <stdio.h>
#include <string.h>
#define N 1000
int main(void)
{
char ch[N],*p;
int a,b;
printf("请输入一个整数:"); gets(ch);
while(1)
{
printf("%s\n",ch);
if(strcmp(ch,"123")==0) break;
p=ch; a=b=0;
while(*p)
{
*p%2==0?a++:b++;
p++;
}
a?sprintf(ch,"%d%d%d",a,b,a+b):sprintf(ch,"%d%d",b,b);
}
return 0;
}
有没有办法让结果输出以后窗口不关闭 而且还可以再次输入计算