// ファイルをCSV 書き込みモードで開く int fileID = open("x2.csv", "wcsv"); for (int i=0; i<=10; i++) { // ファイルに一行書き込み、改行 writeln(fileID, i, i*i); } close(fileID);