You are viewing a single comment's thread. Return to all comments →
using namespace std;
int main(){ string s; cin >> s; int count=0; int l=s.length(); int rows=floor(sqrt(l)); int col=ceil(sqrt(l)); if(rows*col
for(int i=0;i<rows&&m<l;i++){ cout<<s[m]; count++; m=m+col;}k++;n++; if(count<l) cout<<" ";} return 0;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Encryption
You are viewing a single comment's thread. Return to all comments →
include
include
include
include
include
using namespace std;
int main(){ string s; cin >> s; int count=0; int l=s.length(); int rows=floor(sqrt(l)); int col=ceil(sqrt(l)); if(rows*col
}