这个问题我始终弄不明白
											#include <iostream>using namespace std;
int a,b;
int main()
{
cin >>a,b;
if (a%2==0,b%2==0)(a%2==1,b%2==1),
cout <<"yes"<<endl;
else
cout<<"no"<<endl;
return 0;
}
我其实想要弄一个a,b是否同奇偶的,可就是不行,请求帮助!
 2018-01-01 18:03
	    2018-01-01 18:03
   程序代码:
程序代码:#include <iostream>
using namespace std;
int main()
{
    int a, b;
    cin >> a >> b;
    if( (a%2==0 && b%2==0) || (a%2==1 && b%2==1) )
        cout << "yes" << endl;
    else
        cout << "no" << endl;
    return 0;
} 程序代码:
程序代码:#include <iostream>
using namespace std;
int main( void )
{
    int a, b;
    cin >> a >> b;
    cout << (a%2==b%2?"yes":"no") << endl;
} 2018-01-02 08:18
	    2018-01-02 08:18
   
										
					
	 2018-01-05 23:03
	    2018-01-05 23:03
   2018-01-06 07:42
	    2018-01-06 07:42
   2018-01-09 11:42
	    2018-01-09 11:42