// Open the file in CSV reading mode int fileID = open("x2.csv", "rcsv"); // Get the number of lines in the file int n = countln(fileID); // Variables to store values (comma-separated) for each line int x[n]; int y[n]; for(int i = 0; i < n; i++){ // Read the next line and separate values by commas int[] line = readln(fileID); // Assign the first and second elements to x and y, respectively x[i] = line[0]; y[i] = line[1]; } close(fileID); // Display the read data for(int i = 0; i < n; i++){ println(x[i], y[i]); }