[Solved] C++: Using for loop I need to take infinite values of a point using arrays. How can I take values of point [ ] until 2 points of are equal
To test if two consecutive numbers are equal, you dont need 100 elements, you need 2: int points[2], counter = 1; // Read in first point: cin >> points[0]; // Read until we meet our condition: do { // Read a point into the next part of the array. cin >> points[counter]; // toggle counter … Read more