Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- string lit,lit2,ex,spa;
- int a, b,c,d,e,f,g;
- int main(){
- cin >> a;
- cin >> lit;
- getline( cin, lit2 );
- string _str( lit2);
- int iSpaces( 0 );
- for( unsigned int iLoop( 0 ); iLoop < _str.length( ); iLoop++ )
- if( _str.at( iLoop ) == ' ' )
- iSpaces++;
- d = iSpaces;
- b = lit2.size() + lit.size() - 2;
- c = a - b;
- e = lit2.find(' ');
- ex = lit;
- spa = "";
- for(f = c; f > 0; f--){
- spa = spa + ' ';
- };
- ex = ex + spa;
- ex = ex + lit2;
- cout << ex;
- g = ex.size();
- return 0;
- };
Advertisement
Add Comment
Please, Sign In to add comment