#include <stdio.h>
#include <stdlib.h>
//依造自己需求修改
//初始设定b=1为输入正确
//b=2 为输入错误
//b=3 跳脱循环
int test(int *);
int main(int argc, char *argv[])
{
int a,b;
a =1;
do{
b=test(&a);
}while(b!=3);
system("PAUSE");
return 0;
}
int test(int *a)
{
int b;
printf("请输入第%d次算式:",*a);
scanf("%d",&b);
if(b==1)
*a+=1;
else
*a;
return b;
}