ok i need to write a program to generate the co-ordinates of twenty five elements for a square shape. ( 5 by 5 )
i am also given the square as 1m by 1m.
this is what I (indeed a noob) has so far. The second for won't work, im assuming because it reads the same variable, but im a beginner and not sure where to go from here! I welcome any help!!
Code:#include <iostream.h> #include <conio.h> int main() { cout << endl << "Welcome" << endl << endl; int x; int y=1; for (x=1; y<6; y++ ) { cout << "co-ordinates= " << x << y << endl; } for (x=2; y<6; x++ ) { cout << "co-ordinates= " << x << y << endl; } getch(); return 0; }