Răspuns :
Răspuns:
1. #include <iostream>
using namespace std;
int main()
{
int v[101], n;
cin>>n;
for(int i=1; i<=n; ++i)
cin>>v[i];
for(int i=1; i<=n; ++i)
{
if(v[i] % 2 == 1)
cout<<v[i]<<" ";
}
return 0;
}
3. #include <iostream>
using namespace std;
int main()
{
int v[11], n, mini = 99999;
cin>>n;
for(int i=1; i<=n; ++i)
cin>>v[i];
for(int i=1; i<=n; ++i)
{
if(v[i] < mini)
mini = v[i];
}
cout<<mini;
return 0;
}
4. #include <iostream>
using namespace std;
int main()
{
int a[100], n;
cin>>n;
for(int i=1; i<=n; ++i)
cin>>a[i];
for(int i=1; i<=n; ++i)
{
if(a[i] >= 0)
cout<<a[i]<<" ";
}
return 0;
}