Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <time.h>
- using namespace std;
- int main()
- {
- ofstream plik("dane.txt");
- if (!plik.is_open()) cout << "brak dostepu do pliku";
- srand(time(NULL));
- for (int i = 0; i < 10; i++){
- plik<<rand()%30+1<<endl;
- }
- }
Add Comment
Please, Sign In to add comment