#include<iostream>
using namespace std;
int main()
{
int arr[10];
int i;
cout<<"Enter elements in array : ";
for(i=0; i<10; i++)
{
cin>>arr[i];
}
cout<<"\nAll negative elements in array are : ";
for(i=0; i<10; i++)
{
if(arr[i] < 0)
{
cout<<arr[i];
}
}
return 0;
}
No comments:
Post a Comment