Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int a,b,c,d,e,contor=0;
- cin>>a>>b>>c>>d>>e;
- if(a>=0)
- contor=contor+1;
- else contor=contor;
- if(b>=0)
- contor=contor+1;
- else contor=contor;
- if(c>=0)
- contor=contor+1;
- else contor=contor;
- if(d>=0)
- contor=contor+1;
- else contor=contor;
- if(e>=0)
- contor=contor+1;
- else contor=contor;
- if(contor>=3)
- cout<<"Numerele pozitive sunt majoritare.";
- else cout<<"Numerele negative sunt majoritare.";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement