Bob103

3 строки

Dec 22nd, 2015
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. char str[500];
  6. char* ptr;
  7. cout << "Enter string " << std::endl;
  8. cin.getline(str, 500);
  9.  
  10. ptr = strtok(str, " ");
  11.  
  12. while(ptr!=NULL)
  13. {
  14. if(isupper(ptr[0]))
  15. cout << ptr <<endl;
  16. ptr = strtok(NULL, " ");
  17. }
  18. system("pause");
  19. }
Advertisement
Add Comment
Please, Sign In to add comment