You are on page 1of 1

#include <iostream>

#include <string.h>
#include <cmath>
using namespace std;
int i,j;
char s[100];
int main()
{
cin.get(s,100);
cout<<s<<endl;
i=0;
while(strlen(s)>0)
{
strcpy(s,s+1);
strcpy(s+strlen(s)-1,s+strlen(s));
for(j=1;j<=i+1;j++)
cout<<" ";
cout<<s<<endl;
i++;
}
return 0;
}

You might also like