#include “stdafx.h”
int add(int a,int b)
{
int answer;
printf(“两数之和为:”);
scanf_s("%d",&answer);
if(a+b==answer)
return 1;
else
return 0;
}
int _tmain(int argc, _TCHAR* argv[])
{
int a,b;
printf(“请输入两个加数,中间用+连接:”);
scanf_s("%d+%d",&a,&b);
if(add(a,b)==1)
printf(“Right!\n”);
else
printf(“Not correct! Try again!\n”);
}