i’m trying to make cartesian coordinate for my coursework and can only get here, I’m grateful if anyone can help me to fix this "0" line
<?php
$n=10;
for($i=-10;$i<=$n;$i++){
for($j=-10;$j<=$n;$j++){
if($i==0 || $j==0){
echo " $i ";
} else {
echo " ";
}
}
echo "n";
}
2
Answers
You can try this in mode console.
But it’s not really readable
But the principle is there
You could reserve a grid. "Draw" the axis and print it out.
Output