mercredi 21 décembre 2016

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

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.

This is my code:

#include<iostream>
using namespace std;
int main(){
    int a, h, points [100];
    for(a=0 ; points [a]!= points [a-1] ; a++){
        cin>>points [a];

    }
}

Aucun commentaire:

Enregistrer un commentaire