Răspuns :
1.
#include<iostream>
using namespace std;
int main ()
{int N,nr=0,a,i;
cin>>N;
for(i=1;i<=N;i++)
{cin>>a;
if(a<=N&&a%7==0)nr++;}
cout<<nr;
return 0;}
2.
#include<iostream>
using namepsce std;
int main ()
{int N,ok=0;
cin>>N;
if(N==1)ok=0;
else if(N==2)ok=1;
else for(i=3;i<=N;i++)
if(N%i==0)ok++;
if(ok==1) cout<<N<<" este perfect";
else cout<<N<<" nu este perfect";
return 0;}
3
#include<iostream>
using namespace std;
{inf main ()
int i,ok=1;
while(ok<=5)
{for(i=1;i<=ok;i++)
cout<<ok<<" ";
cout<<endl;ok++;}
return 0;}