Guest User

Untitled

a guest
Oct 21st, 2014
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. string lit,lit2,ex,spa;
  7. int a, b,c,d,e,f,g;
  8. int main(){
  9. cin >> a;
  10. cin >> lit;
  11. getline( cin, lit2 );
  12. string _str( lit2);
  13. int iSpaces( 0 );
  14.  
  15. for( unsigned int iLoop( 0 ); iLoop < _str.length( ); iLoop++ )
  16. if( _str.at( iLoop ) == ' ' )
  17. iSpaces++;
  18. d = iSpaces;
  19. b = lit2.size() + lit.size() - 2;
  20. c = a - b;
  21. e = lit2.find(' ');
  22. ex = lit;
  23. spa = "";
  24. for(f = c; f > 0; f--){
  25. spa = spa + ' ';
  26. };
  27. ex = ex + spa;
  28. ex = ex + lit2;
  29. cout << ex;
  30. g = ex.size();
  31. return 0;
  32. };
Advertisement
Add Comment
Please, Sign In to add comment