Skip to content

Instantly share code, notes, and snippets.

@invatainfo
Created September 16, 2017 11:04
#include <iostream>
#include <string.h>
using namespace std;
int main() {
char c[51];
cin>>c;
int i,n = strlen(c);
for (i = 1; i < n + 1; i++) {
char aux = c[i];
c[i] = '\0';
cout<<c<<'\n';
c[i] = aux;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment