main() { int a[20],x; int n=a[0]; for(x=0; x<20; x++) { cout<<"Enter integer : "; cin>>a[x]; while(a[x]<0) { cout<<"Enter integer : "; cin>>a[x]; } }
int countNegative=0 if(a[x]<0) countNegative++
countNegative
if(countNegative==5) break;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)