Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n , V[105] , i , OK , OK1;
- cin >> n;
- OK1 = 0;
- for(i=1;i<=n;i++)
- {
- cin >> V[i];
- OK = 0;
- if(i>=2)
- {
- if(V[i]>=0&&V[i-1]<=0)
- OK = 1;
- if(V[i]<=0&&V[i-1]>=0)
- OK = 1;
- }
- if(OK==0&&i>=2){
- OK1 = 1;
- }
- }
- if(OK1==1)
- cout << "Nu";
- else
- cout << "Da";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement