定义int类型A,B,由while语句实现A,B的输入。判断A+B是否可以除以86余数为0,如是输出“yes",否则输出”no“,按Ctrl Z退出循环。
#include<iostream>
using namespace std;
int main()
{
int A,B;
while(cin>>A>>B)
{
if((A+B)%86)
{
cout<<"no"<<endl;
}
else
cout<<"yes"<<endl;
}
return 0;
}