#include <iostream> using namespace std; int main() { string s; cin>>s; for(int i=0;i<s.length();i++){ cout<<s.substr(0,i+1)<<"\n"; } return 0; }
To embed this program on your website, copy the following code and paste it into your website's HTML: