#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();
}
Retrieved from http://www.chobocho.com/wiki/moniwiki/wiki.php?1000개의랜덤한알파벳생성
last modified 2013-05-21 01:51:13