Odpowiedź:
#include <iostream>
using namespace std;
int a, b;
int main ()
{
cout<<"podaj liczbe a:";
cin>>a;
cout<<"podaj liczbe b: ";
cin>>b;
if ((a % 2== 0) && (b % 2== 0) )
{
cout<<"obie liczby sa parzyste";
}
else if (a % 2== 0)
{
cout<<"liczba a jest parzysta";
}
else if (b % 2== 0)
{
cout<<"liczba b jest parzysta";
}
else
{
cout<<"zadna liczba nie jest parzytsa";
}
return 0;
}
Wyjaśnienie: