Advertisement
Guest User

Untitled

a guest
Feb 2nd, 2014
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <stdlib.h>
  4.  
  5. int main()
  6. {
  7. std::string input;
  8. std::cout << "Enter a sentence:" <<std::endl;
  9. getline(std::cin, input);
  10.  
  11. std::string input2 = input.substr();
  12.  
  13. for(int i = 0; i <= input.size(); i++)
  14. {
  15. if(input[i] != ' ')
  16. {
  17. if(atoi(input2.c_str()) != 0)
  18. {
  19.  
  20. }
  21. else
  22. {
  23. std::cout << input[i];
  24. }
  25. }
  26. else
  27. {
  28. std::cout << std::endl;
  29. }
  30. }
  31.  
  32. system("pause");
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement