Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- const char* exclamation[4] = { "SHOK", "SKANDAL", "NECHUVANA NAGLOST" };
- const char* object[6] = { "Rqpa", "Baba", "Kmet", "Bager", "Sklad" };
- bool objectandsubject[][6] = { { true, true },
- { true, true },
- { true, true },
- { true, true },
- { true, false },
- };
- const char* action[6] = { "sgazi", "zadiga", "namiga na", "precakva", "tarashi" };
- char exclamationMark;
- const char* subject;
- // char* exclamation, subject, exclamationMark = {}, object, action;
- int n;
- cout << "Enter number of headings: ";
- cin >> n;
- int numofExclamationMarks;
- int temp;
- for (int i = 0; i < n; i++){
- exclamationMark = {};
- *exclamation = exclamation[(int)rand()*strlen(*exclamation - 1)];
- numofExclamationMarks = (int)(1 + rand() * 5);
- for (int j = 0; j < numofExclamationMarks; j++)
- exclamationMark += '!';
- *action = action[(int)(rand()*strlen(*action - 1))];
- do{
- temp = (int)(rand()*strlen(*object - 1));
- } while (objectandsubject[temp][1] == false);
- subject = object[temp];
- do{
- (int)(rand()*strlen(*object - 1));
- } while (objectandsubject[temp][0] == false);
- //object& = *object[temp];
- cout << (char)exclamation << " " << exclamationMark << " " << subject << " " << action << " " << object << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement