Răspuns:
In C++:
#include <iostream>
using namespace std
int a[1005],n;
int main()
{
int i, nrimp=0, nr7=0, nr19=0;
cin>>n;
for (i=1; i<=n; i++)
cin>>a[i];
/// cerinta 1:
for (i=1; i<=n; i++)
if (a[i]÷2==1)
{
nrimp++
cout<<a[i]<<" ";
}
cout<<"\n"<<nrimp<<"\n";
/// cerinta 2:
for (i=1; i<=n; i++)
if (a[i]÷7==0)
{
nr7++
cout<<a[i]<<" ";
}
cout<<"\n"<<nr7<<"\n";
/// cerinta 3:
for (i=1; i<=n; i++)
if (a[i]>19)
{
nr19++
cout<<a[i]<<" ";
}
cout<<"\n"<<nr19<<"\n";
return 0;
}
Succes! ♡︎♥︎♡︎