👤

Se citesc de la tastatura n nr intregi. Afisati nr elementelor negative.

Răspuns :

#include <iostream>
using namespace std;
int main()
{
    int nr;
    cout<<"nr=";
    while(cin>>nr)
   {
        if(nr<0)
        cout<<nr<<" ";
    }
return 0;
}