33

mail@pastecode.io avatar
unknown
plain_text
2 years ago
463 B
16
Indexable
Never
#include <iostream>
#include <string>


int main(int argc,char** argv) {
    std::string z ="";
    for (int i = 1; i < argc; ++i) {
        std::string x= std::string(argv[i]);
        int n = x.length();
        int s=0;
        for (int i = 0; i < n-1 ;i++) {
            if(x[i]==x[i+1]){
                s+=1;

            } else{
                continue;
            }

        }
        if(s==n-1){
        z+=x;
        z+=" ";}
    }
    std::cout<<z;
}