Advertisement
Soverein

Untitled

Sep 30th, 2021
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include <iostream>
  2. #include<time.h>
  3. #include<fstream>
  4. #include<ctime>
  5. #include<random>
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10.     vector<double> VEK (25);
  11.     ofstream fout;
  12.     fout.open("write.txt");
  13.     const int n=25;
  14.     cout << "enter count of elements";
  15.     double mas[n];
  16.     for (int i = 0; i < n; i++)
  17.     {
  18.         mas[i] = (rand() % 100 )/ 10.0;
  19.     }
  20.     for (int i = 0; i < n; i++)
  21.     {
  22.         fout << mas[i]<<" ";
  23.     }
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement