#include
#include
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(){
int x[]={5,6,-9,4,-8,56,-866,45,-7,-30};
int z[10];
int n=10;
int k=0;
for(int i=0,j=0;iif(x[i]<0){
z[j]=x[i];
j++;
k++;}
}
for(int i=0;icout<}
return 0;
}
Do'stlaringiz bilan baham: |