Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include<cstring>
- using namespace std;
- int main()
- {
- char s[256];
- int i ,j,n;
- cin.get(s,256);
- n=strlen(s);
- for(i=n-1;i>=0;i--)
- {for(j=0;j<=i;j++)
- cout <<s[j];
- cout<<'\n';
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement