You are on page 1of 3

V19-Rezolvare

II-2

Struct proiect{
Char tema[21];
Int nrsurse;
Char denAdrsurse[10][101];
} p;
Exemplu:
p.tema=”tinerii in UE”;
p.nrsurse=3;
p.denAdrsurse[0]=”net”;
p.denAdrsurse[1]=”spatiu European”;
p.denAdrsurse[2]=”TV”;

III-2
#include <iostream>
using namespace std;
int a[21][21],m,n,k,i,j,ok;
int main()
{
cin>>m>>n>>k;
for(i=1;i<=m;i++)
for(j=1;j<=n;j++)
cin>>a[i][j];
for(i=1;i<=m;i++)
{
if(i!=k)
{
ok=1;
for(j=1;j<=n;j++)
if(a[i][j]==a[k][j])
{
ok=0;
break;

}
if(ok==1)
break;
}
if(ok==1)
cout<<"DA";
else
cout<<"NU";
return 0;
}
III-3
#include <iostream>
using namespace std;
int x,y;
int main()
{
cin>>x;
while(cin>>y)
{
if(x%2==0 && x!=y)
cout<<x<<" ";
x=y;
}
return 0;
}

You might also like