Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- #include <math.h>
- #include <time.h>
- using namespace std;
- void main()
- {
- srand(time(NULL));
- setlocale(LC_ALL,"Russian");
- int mass[100],count=0;
- for(int i=0;i<100;i++)
- {
- mass[i]=(rand()%201)-100;
- if(mass[i]>=0)
- {
- count++;
- }
- else
- {
- if(count>5)
- cout<<i-count<<endl;
- count=0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement