#include<stdio.h> int main() { int a,b,c; do{ printf("请输入两个数字用空格键隔开:"); scanf("%d %d",&a,&b); c = a+b; printf("%d + %d = %d\n",a,b,c); }while(c != 0); //输入两个0退出 return 0; }