Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Jeffrey Liv
- //CPSC 131
- //Project 11 Part 1
- #include <iostream>
- #include <string>
- #include <cstring>
- #define _CRT_SECURE_NO_WARNINGS
- #include <ctime>
- using namespace std;
- int main()
- {
- time_t p;
- time(&p);
- cout << "Today's date and time " << endl << ctime(&p) << endl;
- char option;
- do{
- char line[80];
- cout << "Enter a phrase: ";
- cin.getline(line, 80, '\n');
- char *token;
- cout << " ";
- token = strtok(line, ",;:?.");
- while (token != NULL)
- {
- cout << token << " ";
- token = strtok(NULL, ",;:?.");
- }
- cout << endl;
- cout << "CONTINUE(Y/N)? ";
- cin >> option;
- cin.ignore();
- } while (option == 'Y' || option == 'y');
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement