Your mind understands what you have been taught; your heart, what is true.
FrontPage › 1000개의랜덤한알파벳생성
No older revisions available
#include <iostream> #include <fstream> #include <ctime> #include <cstdlib> using namespace std; void process(); int main() { process(); return 0; } void process() { fstream target_fp; target_fp.open("input1.txt",ios::out); srand(time(NULL)); int count = rand()%10 + 1; int i = 0, j = 0; char tCh; target_fp << count << endl; for ( i = 0; i < count; i++) { for ( j = 0; j < 1000; j++ ) { tCh = 'A' + rand()%26; target_fp << tCh; } target_fp << endl; } target_fp.close(); }