Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- { int a[101][101],m,n,i,j,nr0=0,nrneg=0,nrpoz=0;
- cout<<"n=";cin>>n;
- cout<<"m=";cin>>m;
- for( i=0;i<n;i++)
- for( j=0;j<m;j++)
- cin>>a[i][j];//*/
- for(int i=0;i<n;i++)
- for(int j=0;j<m;j++)
- {
- if (!a[i][j])
- nr0++;
- else
- if (a[i][j]>0)
- nrpoz++;
- else
- nrneg++;
- }
- cout<<"pozitve:"<<nrpoz<<endl;
- cout<<"nule:"<<nr0<<endl;
- cout<<"negative:"<<nrneg;
- return 0; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement