1.
#include <iostream>
using namespace std;
int main()
{
int a, b;
cin >> a >> b;
if (a % 2 == 0)
{
cout << "a este par" << endl;
}
else
{
cout << "a este impar" << endl;
}
if (b % 2 == 0)
{
cout << "b este par";
}
else
{
cout << "b este impar";
}
return 0;
}
2.
#include <iostream>
using namespace std;
int main()
{
int a, b, c;
cin >> a >> b >> c;
if (a % 2 != 0 && b % 2 != 0 || a % 2 != 0 && c % 2 != 0 || b % 2 != 0 && c % 2 != 0)
{
cout << a + b + c;
}
else
{
cout << a - b - c;
}
return 0;
}
3.
#include <iostream>
using namespace std;
int main()
{
int a, b;
cin >> a >> b;
if (a % b == 0)
{
if (a + b > 10)
{
cout << "Numerele a si b se impart exact si au suma mai mare decat 10";
}
else
{
cout << "Numerele a si b se impart exact dar nu au suma mai mare decat 10";
}
}
else
{
cout << "Nu se impart exact";
}
return 0;
}