Advertisement
Guest User

Untitled

a guest
Jan 26th, 2020
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip> // for std::noskipws
  3. //#include <cstdio>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. int i = 0;
  10. char str[100];
  11. bool is_within_double_quotes = false;
  12. char byte;
  13. int count = 0;
  14. while (cin >> noskipws >> byte)
  15. {
  16. switch(byte){
  17. case '.':
  18. byte = ' ';
  19. break;
  20. case ',':
  21. byte = ' ';
  22. break;
  23. case '?':
  24. byte = ' ';
  25. break;
  26. case '-':
  27. byte = ' ';
  28. break;
  29. case '\'':
  30. byte = ' ';
  31. break;
  32. case '\"':
  33. count++;
  34. break;
  35. }
  36. str[i] = byte;
  37. //cout << byte;
  38. cout << str[i];
  39. i++;
  40.  
  41.  
  42. // NOTE: output your bytes with cout.put(byte);
  43. // or, cout << byte; (if byte is a char)
  44. // or, cout << static_cast<char>(byte); (if byte is not a char)
  45. //#error "Write code in here to process the input and write output to std::cout."
  46. }
  47. cout << "test";
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement