Răspuns :

Salut!

Ai rezolvarile in limbajul C++ mai jos

1.

#include <iostream>

using namespace std;

int main()

{

int n, s = 0;

while (n != 0)

{

cin >> n;

if (n % 2 == 0)

{

s += n;

}

}

cout << s;

return 0;

}

2.

#include <iostream>

using namespace std;

int main()

{

int n, num = 0;

while (n != 0)

{

cin >> n;

if (n % 2 == 1)

{

num++;

}

}

cout << num;

return 0;

}