Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip> // for std::noskipws
- //#include <cstdio>
- using namespace std;
- int main()
- {
- int i = 0;
- char str[100];
- bool is_within_double_quotes = false;
- char byte;
- int count = 0;
- while (cin >> noskipws >> byte)
- {
- switch(byte){
- case '.':
- byte = ' ';
- break;
- case ',':
- byte = ' ';
- break;
- case '?':
- byte = ' ';
- break;
- case '-':
- byte = ' ';
- break;
- case '\'':
- byte = ' ';
- break;
- case '\"':
- count++;
- break;
- }
- str[i] = byte;
- //cout << byte;
- cout << str[i];
- i++;
- // NOTE: output your bytes with cout.put(byte);
- // or, cout << byte; (if byte is a char)
- // or, cout << static_cast<char>(byte); (if byte is not a char)
- //#error "Write code in here to process the input and write output to std::cout."
- }
- cout << "test";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement