Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- #include <time.h>
- #include <stdlib.h>
- using namespace std;
- int rand_number(int a, int b){return (rand()%(b-a+1)+a);}
- int main(){
- srand(time(0));
- ofstream fout("in.txt");
- for(int i = 0, a = -5, b = 5, N = 10; i < N; i++)
- fout << rand_number(a, b) << " " << rand_number(a, b) << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement