#include <iostream> #include <fstream> #include <conio.h> #include <time.h> using namespace std; const int size = 220; void main () { ofstream fopen("C:\Users\User\Documents\text.txt"); char s1[] = "abcdefghijklm"; char s2[size]; srand(time(NULL)); s2[size - 1] = ''; for (int i = 0; i < size - 1; i++) { s2[i] = s1[rand() % strlen(s1)]; } fopen << s2; fopen.close(); _getch(); }
Инфа — 20%