Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n, l=0, k=0, i;
- for(i=1; i<=5; i++)
- { cout<<"Introduceti numarul:";cin>>n;
- if(n<0)
- l=l+1;
- else
- k=k+1;
- }
- if(l<k)
- cout<<"Semnul majoritar este:+";
- else
- cout<<"Semnul majoritar este:-";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement