Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <cstdlib>
- #include <ctime>
- using namespace std;
- main()
- {
- int x[150];
- srand(time(NULL));
- for(int i=0; i<150; i++)
- {
- if(i%3 == 0)
- {
- x[i]=0;
- }else
- {
- x[i]=rand%11;
- }
- }
- int odleglosc=0;
- for(int=0; i<149; i++)
- {
- int temp=0;
- temp=x[x+1]-x[i];
- if(temp<0)
- temp= -temp;
- odleglosc=odleglosc+temp;
- odleglosc=odleglosc*3;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement