Advertisement
Guest User

Untitled

a guest
May 24th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3. #include <fstream>
  4. #include <stdio.h>
  5. #include <conio.h>
  6. #include <time.h>
  7. using namespace std;
  8.  
  9.  
  10. int main()
  11. {
  12. setlocale(LC_ALL, "Russian");
  13.  
  14. ofstream fout;
  15. int n = 20; int i;
  16. int massive[20];
  17.  
  18. srand(time(0));
  19. fout.open("E:\text1.txt");
  20.  
  21. for (i = 1; i < n; i++)
  22. {
  23. massive[i] = -10 + rand() % 21;
  24. }
  25. fout << n << "\n";
  26. fout.close();
  27. return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement