JakubKaczmarek_123

zadanie 1

Mar 26th, 2021 (edited)
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <time.h>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     ofstream plik("dane.txt");
  9. if (!plik.is_open()) cout << "brak dostepu do pliku";
  10. srand(time(NULL));
  11. for (int i = 0; i < 10; i++){
  12. plik<<rand()%30+1<<endl;
  13. }
  14.  
  15.  
  16. }
  17.  
Add Comment
Please, Sign In to add comment