it is unnecessary (and evil) to add something to the x variable.
x += 35
You change the variable of the for-loop. Or was it a typo?
Don’t do this.
Example
Example which is not correct but should get you started
void setup() {
size(420, 420);
background(0, 255, 0);
noStroke();
}
void draw() {
for (int x = 0; x <= 420; x += width/6) {
for (int y = 0; y <= 420; y += height/6) {
triangle(x, y,
x - 35, y+70,
x+35, y+70);
}
}
}