Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <ctime>
- #include <algorithm>
- using namespace std;
- void getSign()
- {
- int x = rand()%20;
- if (x > 9) cout << "*";
- else cout << x;
- }
- int main(int argc, char *argv)
- {
- srand(argv[0]);
- int cyfry[10] = {0,1,2,3,4,5,6,7,8,9};
- random_shuffle(cyfry,cyfry+10);
- int c = rand()%10+1;
- cout << c << "\n";
- while (c--) cout << cyfry[c] << " ";
- int t = rand()%200 + 1;
- cout << "\n"<<t<<"\n";
- while (t--)
- {
- cout << rand()%9+1;
- int n = rand()%1000+1;
- while(n--) getSign();
- cout << "\n";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement