Random Sentences generator
up vote
2
down vote
favorite
This program use random number generator to create sentences. It prints 20 sentences randomly.
Here is the code:
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <ctype.h>
#define STR_LEN 80
#define MAX_SEN 20
int main(void) {
char *article = {"the", "a", "one", "some", "any"};
char *noun = {"boy", "girl", "dog", "town", "car"};
char *verb = {"drove", "jumped", "ran", "walked", "skipped"};
char *preposition = {"to", "from", "over", "under", "on"};
int num;
char sentence[MAX_SEN][STR_LEN];
char (*i)[STR_LEN];
srand((unsigned) time(NULL));
for(i = sentence; i < sentence + MAX_SEN; i++) {
num = rand() % (sizeof(article)/sizeof(article[0]));
strcpy(*i, article[num]);
num = rand() % (sizeof(noun)/sizeof(noun[0]));
strcat(strcat(*i, " "), noun[num]);
num = rand() % (sizeof(preposition)/sizeof(preposition[0]));
strcat(strcat(*i, " "), preposition[num]);
printf("%s.n", *i);
}
return 0;
}
Can you make some improvements on the code especially on the sizeof
operator. You can use any things functions, arrays, strings, pointers etc.
Also, I don't know how to make first letter capital of each sentence using toupper()
function.
c array
add a comment |
up vote
2
down vote
favorite
This program use random number generator to create sentences. It prints 20 sentences randomly.
Here is the code:
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <ctype.h>
#define STR_LEN 80
#define MAX_SEN 20
int main(void) {
char *article = {"the", "a", "one", "some", "any"};
char *noun = {"boy", "girl", "dog", "town", "car"};
char *verb = {"drove", "jumped", "ran", "walked", "skipped"};
char *preposition = {"to", "from", "over", "under", "on"};
int num;
char sentence[MAX_SEN][STR_LEN];
char (*i)[STR_LEN];
srand((unsigned) time(NULL));
for(i = sentence; i < sentence + MAX_SEN; i++) {
num = rand() % (sizeof(article)/sizeof(article[0]));
strcpy(*i, article[num]);
num = rand() % (sizeof(noun)/sizeof(noun[0]));
strcat(strcat(*i, " "), noun[num]);
num = rand() % (sizeof(preposition)/sizeof(preposition[0]));
strcat(strcat(*i, " "), preposition[num]);
printf("%s.n", *i);
}
return 0;
}
Can you make some improvements on the code especially on the sizeof
operator. You can use any things functions, arrays, strings, pointers etc.
Also, I don't know how to make first letter capital of each sentence using toupper()
function.
c array
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
This program use random number generator to create sentences. It prints 20 sentences randomly.
Here is the code:
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <ctype.h>
#define STR_LEN 80
#define MAX_SEN 20
int main(void) {
char *article = {"the", "a", "one", "some", "any"};
char *noun = {"boy", "girl", "dog", "town", "car"};
char *verb = {"drove", "jumped", "ran", "walked", "skipped"};
char *preposition = {"to", "from", "over", "under", "on"};
int num;
char sentence[MAX_SEN][STR_LEN];
char (*i)[STR_LEN];
srand((unsigned) time(NULL));
for(i = sentence; i < sentence + MAX_SEN; i++) {
num = rand() % (sizeof(article)/sizeof(article[0]));
strcpy(*i, article[num]);
num = rand() % (sizeof(noun)/sizeof(noun[0]));
strcat(strcat(*i, " "), noun[num]);
num = rand() % (sizeof(preposition)/sizeof(preposition[0]));
strcat(strcat(*i, " "), preposition[num]);
printf("%s.n", *i);
}
return 0;
}
Can you make some improvements on the code especially on the sizeof
operator. You can use any things functions, arrays, strings, pointers etc.
Also, I don't know how to make first letter capital of each sentence using toupper()
function.
c array
This program use random number generator to create sentences. It prints 20 sentences randomly.
Here is the code:
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <ctype.h>
#define STR_LEN 80
#define MAX_SEN 20
int main(void) {
char *article = {"the", "a", "one", "some", "any"};
char *noun = {"boy", "girl", "dog", "town", "car"};
char *verb = {"drove", "jumped", "ran", "walked", "skipped"};
char *preposition = {"to", "from", "over", "under", "on"};
int num;
char sentence[MAX_SEN][STR_LEN];
char (*i)[STR_LEN];
srand((unsigned) time(NULL));
for(i = sentence; i < sentence + MAX_SEN; i++) {
num = rand() % (sizeof(article)/sizeof(article[0]));
strcpy(*i, article[num]);
num = rand() % (sizeof(noun)/sizeof(noun[0]));
strcat(strcat(*i, " "), noun[num]);
num = rand() % (sizeof(preposition)/sizeof(preposition[0]));
strcat(strcat(*i, " "), preposition[num]);
printf("%s.n", *i);
}
return 0;
}
Can you make some improvements on the code especially on the sizeof
operator. You can use any things functions, arrays, strings, pointers etc.
Also, I don't know how to make first letter capital of each sentence using toupper()
function.
c array
c array
edited May 6 '15 at 13:34
Caridorc
22.9k536114
22.9k536114
asked Mar 13 '13 at 14:06
Ashish Rawat
14928
14928
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
3
down vote
accepted
Sorry for no explanation. Not really sure why I wrote this. Just saw your post, got in the zone, and suddenly I have a chunk of code! Hope it is insightful.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
const int SEN_LEN = 80;
const int MAX_SEN = 20;
const char* ARTICLES = {"the", "a", "one", "some", "any"};
const char* NOUNS = {"boy", "girl", "dog", "town", "car"};
const char* VERBS = {"drove", "jumped", "ran", "walked", "skipped"};
const char* PREPOSITIONS = {"to", "from", "over", "under", "on"};
const int ARTICLES_SIZE = sizeof(ARTICLES)/sizeof(ARTICLES[0]);
const int NOUNS_SIZE = sizeof(NOUNS)/sizeof(NOUNS[0]);
const int VERBS_SIZE = sizeof(VERBS)/sizeof(VERBS[0]);
const int PREPOSITIONS_SIZE = sizeof(PREPOSITIONS)/sizeof(PREPOSITIONS[0]);
char* generateSentence() {
char* sentence = calloc((SEN_LEN+1), sizeof(char));
//Build Sentence
strcat(sentence, ARTICLES[rand()%ARTICLES_SIZE]);
strcat(sentence, " ");
strcat(sentence, NOUNS[rand()%NOUNS_SIZE]);
strcat(sentence, " ");
strcat(sentence, VERBS[rand()%VERBS_SIZE]);
strcat(sentence, " ");
strcat(sentence, PREPOSITIONS[rand()%PREPOSITIONS_SIZE]);
//Capitalize first letter
sentence[0] = toupper(sentence[0]);
return sentence;
}
int main(int argc, char* argv) {
srand(time(NULL));
for(int i = 0; i < MAX_SEN; i++) {
char* sentence = generateSentence();
printf("%s.n", sentence);
free(sentence);
}
return 0;
}
Requires C99. (-std=c99 on gcc)
3
Well, when you have time please add some explanations.
– Hugo Dozois
Mar 14 '13 at 0:01
add a comment |
up vote
1
down vote
I can't really say there is anything wrong with your code although I really don't like the nested strcat
. There are some minor quibbles, such as the opening brace not being in column 0, the parameters missing from main and the stdlib include missing.
However I can offer some alternatives that are not necessarily better, just different. In the code below, I used a typedef to define a sentence type. To my eyes it is easier to handle one-D arrays (ie and array of sentences) that 2-D arrays. But that is just me. I also used a simple index in the loop rather than a pointer to the sentence. - seems more straightforward to me. And I put each array size into a const - in the code it doesn't matter but in something larger you might want the size more than once. I also defined num
at the point of first use. I also added some extra vertical spacing to make it clearer, although I probably wouldn't so much in real code.
typedef char sentence[STR_LEN];
int main(int argc, char **argv)
{
char *article = {"the", "a", "one", "some", "any"};
const size_t n_articles = sizeof article /sizeof article[0];
char *noun = {"boy", "girl", "dog", "town", "car"};
const size_t n_nouns = sizeof noun /sizeof noun[0];
char *preposition = {"to", "from", "over", "under", "on"};
const size_t n_prepositions = sizeof preposition /sizeof preposition[0];
sentence sentences[MAX_SEN];
srand((unsigned) time(NULL));
for (int i = 0; i < MAX_SEN; ++i) {
int num = rand() % n_articles;
strcpy(sentences[i], article[num]);
num = rand() % n_nouns;
strcat(sentences[i], " ");
strcat(sentences[i], noun[num]);
num = rand() % n_prepositions;
strcat(sentences[i], " ");
strcat(sentences[i], preposition[num]);
printf("%s.n", sentences[i]);
}
return 0;
}
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
Sorry for no explanation. Not really sure why I wrote this. Just saw your post, got in the zone, and suddenly I have a chunk of code! Hope it is insightful.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
const int SEN_LEN = 80;
const int MAX_SEN = 20;
const char* ARTICLES = {"the", "a", "one", "some", "any"};
const char* NOUNS = {"boy", "girl", "dog", "town", "car"};
const char* VERBS = {"drove", "jumped", "ran", "walked", "skipped"};
const char* PREPOSITIONS = {"to", "from", "over", "under", "on"};
const int ARTICLES_SIZE = sizeof(ARTICLES)/sizeof(ARTICLES[0]);
const int NOUNS_SIZE = sizeof(NOUNS)/sizeof(NOUNS[0]);
const int VERBS_SIZE = sizeof(VERBS)/sizeof(VERBS[0]);
const int PREPOSITIONS_SIZE = sizeof(PREPOSITIONS)/sizeof(PREPOSITIONS[0]);
char* generateSentence() {
char* sentence = calloc((SEN_LEN+1), sizeof(char));
//Build Sentence
strcat(sentence, ARTICLES[rand()%ARTICLES_SIZE]);
strcat(sentence, " ");
strcat(sentence, NOUNS[rand()%NOUNS_SIZE]);
strcat(sentence, " ");
strcat(sentence, VERBS[rand()%VERBS_SIZE]);
strcat(sentence, " ");
strcat(sentence, PREPOSITIONS[rand()%PREPOSITIONS_SIZE]);
//Capitalize first letter
sentence[0] = toupper(sentence[0]);
return sentence;
}
int main(int argc, char* argv) {
srand(time(NULL));
for(int i = 0; i < MAX_SEN; i++) {
char* sentence = generateSentence();
printf("%s.n", sentence);
free(sentence);
}
return 0;
}
Requires C99. (-std=c99 on gcc)
3
Well, when you have time please add some explanations.
– Hugo Dozois
Mar 14 '13 at 0:01
add a comment |
up vote
3
down vote
accepted
Sorry for no explanation. Not really sure why I wrote this. Just saw your post, got in the zone, and suddenly I have a chunk of code! Hope it is insightful.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
const int SEN_LEN = 80;
const int MAX_SEN = 20;
const char* ARTICLES = {"the", "a", "one", "some", "any"};
const char* NOUNS = {"boy", "girl", "dog", "town", "car"};
const char* VERBS = {"drove", "jumped", "ran", "walked", "skipped"};
const char* PREPOSITIONS = {"to", "from", "over", "under", "on"};
const int ARTICLES_SIZE = sizeof(ARTICLES)/sizeof(ARTICLES[0]);
const int NOUNS_SIZE = sizeof(NOUNS)/sizeof(NOUNS[0]);
const int VERBS_SIZE = sizeof(VERBS)/sizeof(VERBS[0]);
const int PREPOSITIONS_SIZE = sizeof(PREPOSITIONS)/sizeof(PREPOSITIONS[0]);
char* generateSentence() {
char* sentence = calloc((SEN_LEN+1), sizeof(char));
//Build Sentence
strcat(sentence, ARTICLES[rand()%ARTICLES_SIZE]);
strcat(sentence, " ");
strcat(sentence, NOUNS[rand()%NOUNS_SIZE]);
strcat(sentence, " ");
strcat(sentence, VERBS[rand()%VERBS_SIZE]);
strcat(sentence, " ");
strcat(sentence, PREPOSITIONS[rand()%PREPOSITIONS_SIZE]);
//Capitalize first letter
sentence[0] = toupper(sentence[0]);
return sentence;
}
int main(int argc, char* argv) {
srand(time(NULL));
for(int i = 0; i < MAX_SEN; i++) {
char* sentence = generateSentence();
printf("%s.n", sentence);
free(sentence);
}
return 0;
}
Requires C99. (-std=c99 on gcc)
3
Well, when you have time please add some explanations.
– Hugo Dozois
Mar 14 '13 at 0:01
add a comment |
up vote
3
down vote
accepted
up vote
3
down vote
accepted
Sorry for no explanation. Not really sure why I wrote this. Just saw your post, got in the zone, and suddenly I have a chunk of code! Hope it is insightful.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
const int SEN_LEN = 80;
const int MAX_SEN = 20;
const char* ARTICLES = {"the", "a", "one", "some", "any"};
const char* NOUNS = {"boy", "girl", "dog", "town", "car"};
const char* VERBS = {"drove", "jumped", "ran", "walked", "skipped"};
const char* PREPOSITIONS = {"to", "from", "over", "under", "on"};
const int ARTICLES_SIZE = sizeof(ARTICLES)/sizeof(ARTICLES[0]);
const int NOUNS_SIZE = sizeof(NOUNS)/sizeof(NOUNS[0]);
const int VERBS_SIZE = sizeof(VERBS)/sizeof(VERBS[0]);
const int PREPOSITIONS_SIZE = sizeof(PREPOSITIONS)/sizeof(PREPOSITIONS[0]);
char* generateSentence() {
char* sentence = calloc((SEN_LEN+1), sizeof(char));
//Build Sentence
strcat(sentence, ARTICLES[rand()%ARTICLES_SIZE]);
strcat(sentence, " ");
strcat(sentence, NOUNS[rand()%NOUNS_SIZE]);
strcat(sentence, " ");
strcat(sentence, VERBS[rand()%VERBS_SIZE]);
strcat(sentence, " ");
strcat(sentence, PREPOSITIONS[rand()%PREPOSITIONS_SIZE]);
//Capitalize first letter
sentence[0] = toupper(sentence[0]);
return sentence;
}
int main(int argc, char* argv) {
srand(time(NULL));
for(int i = 0; i < MAX_SEN; i++) {
char* sentence = generateSentence();
printf("%s.n", sentence);
free(sentence);
}
return 0;
}
Requires C99. (-std=c99 on gcc)
Sorry for no explanation. Not really sure why I wrote this. Just saw your post, got in the zone, and suddenly I have a chunk of code! Hope it is insightful.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
const int SEN_LEN = 80;
const int MAX_SEN = 20;
const char* ARTICLES = {"the", "a", "one", "some", "any"};
const char* NOUNS = {"boy", "girl", "dog", "town", "car"};
const char* VERBS = {"drove", "jumped", "ran", "walked", "skipped"};
const char* PREPOSITIONS = {"to", "from", "over", "under", "on"};
const int ARTICLES_SIZE = sizeof(ARTICLES)/sizeof(ARTICLES[0]);
const int NOUNS_SIZE = sizeof(NOUNS)/sizeof(NOUNS[0]);
const int VERBS_SIZE = sizeof(VERBS)/sizeof(VERBS[0]);
const int PREPOSITIONS_SIZE = sizeof(PREPOSITIONS)/sizeof(PREPOSITIONS[0]);
char* generateSentence() {
char* sentence = calloc((SEN_LEN+1), sizeof(char));
//Build Sentence
strcat(sentence, ARTICLES[rand()%ARTICLES_SIZE]);
strcat(sentence, " ");
strcat(sentence, NOUNS[rand()%NOUNS_SIZE]);
strcat(sentence, " ");
strcat(sentence, VERBS[rand()%VERBS_SIZE]);
strcat(sentence, " ");
strcat(sentence, PREPOSITIONS[rand()%PREPOSITIONS_SIZE]);
//Capitalize first letter
sentence[0] = toupper(sentence[0]);
return sentence;
}
int main(int argc, char* argv) {
srand(time(NULL));
for(int i = 0; i < MAX_SEN; i++) {
char* sentence = generateSentence();
printf("%s.n", sentence);
free(sentence);
}
return 0;
}
Requires C99. (-std=c99 on gcc)
answered Mar 13 '13 at 23:40
John
461
461
3
Well, when you have time please add some explanations.
– Hugo Dozois
Mar 14 '13 at 0:01
add a comment |
3
Well, when you have time please add some explanations.
– Hugo Dozois
Mar 14 '13 at 0:01
3
3
Well, when you have time please add some explanations.
– Hugo Dozois
Mar 14 '13 at 0:01
Well, when you have time please add some explanations.
– Hugo Dozois
Mar 14 '13 at 0:01
add a comment |
up vote
1
down vote
I can't really say there is anything wrong with your code although I really don't like the nested strcat
. There are some minor quibbles, such as the opening brace not being in column 0, the parameters missing from main and the stdlib include missing.
However I can offer some alternatives that are not necessarily better, just different. In the code below, I used a typedef to define a sentence type. To my eyes it is easier to handle one-D arrays (ie and array of sentences) that 2-D arrays. But that is just me. I also used a simple index in the loop rather than a pointer to the sentence. - seems more straightforward to me. And I put each array size into a const - in the code it doesn't matter but in something larger you might want the size more than once. I also defined num
at the point of first use. I also added some extra vertical spacing to make it clearer, although I probably wouldn't so much in real code.
typedef char sentence[STR_LEN];
int main(int argc, char **argv)
{
char *article = {"the", "a", "one", "some", "any"};
const size_t n_articles = sizeof article /sizeof article[0];
char *noun = {"boy", "girl", "dog", "town", "car"};
const size_t n_nouns = sizeof noun /sizeof noun[0];
char *preposition = {"to", "from", "over", "under", "on"};
const size_t n_prepositions = sizeof preposition /sizeof preposition[0];
sentence sentences[MAX_SEN];
srand((unsigned) time(NULL));
for (int i = 0; i < MAX_SEN; ++i) {
int num = rand() % n_articles;
strcpy(sentences[i], article[num]);
num = rand() % n_nouns;
strcat(sentences[i], " ");
strcat(sentences[i], noun[num]);
num = rand() % n_prepositions;
strcat(sentences[i], " ");
strcat(sentences[i], preposition[num]);
printf("%s.n", sentences[i]);
}
return 0;
}
add a comment |
up vote
1
down vote
I can't really say there is anything wrong with your code although I really don't like the nested strcat
. There are some minor quibbles, such as the opening brace not being in column 0, the parameters missing from main and the stdlib include missing.
However I can offer some alternatives that are not necessarily better, just different. In the code below, I used a typedef to define a sentence type. To my eyes it is easier to handle one-D arrays (ie and array of sentences) that 2-D arrays. But that is just me. I also used a simple index in the loop rather than a pointer to the sentence. - seems more straightforward to me. And I put each array size into a const - in the code it doesn't matter but in something larger you might want the size more than once. I also defined num
at the point of first use. I also added some extra vertical spacing to make it clearer, although I probably wouldn't so much in real code.
typedef char sentence[STR_LEN];
int main(int argc, char **argv)
{
char *article = {"the", "a", "one", "some", "any"};
const size_t n_articles = sizeof article /sizeof article[0];
char *noun = {"boy", "girl", "dog", "town", "car"};
const size_t n_nouns = sizeof noun /sizeof noun[0];
char *preposition = {"to", "from", "over", "under", "on"};
const size_t n_prepositions = sizeof preposition /sizeof preposition[0];
sentence sentences[MAX_SEN];
srand((unsigned) time(NULL));
for (int i = 0; i < MAX_SEN; ++i) {
int num = rand() % n_articles;
strcpy(sentences[i], article[num]);
num = rand() % n_nouns;
strcat(sentences[i], " ");
strcat(sentences[i], noun[num]);
num = rand() % n_prepositions;
strcat(sentences[i], " ");
strcat(sentences[i], preposition[num]);
printf("%s.n", sentences[i]);
}
return 0;
}
add a comment |
up vote
1
down vote
up vote
1
down vote
I can't really say there is anything wrong with your code although I really don't like the nested strcat
. There are some minor quibbles, such as the opening brace not being in column 0, the parameters missing from main and the stdlib include missing.
However I can offer some alternatives that are not necessarily better, just different. In the code below, I used a typedef to define a sentence type. To my eyes it is easier to handle one-D arrays (ie and array of sentences) that 2-D arrays. But that is just me. I also used a simple index in the loop rather than a pointer to the sentence. - seems more straightforward to me. And I put each array size into a const - in the code it doesn't matter but in something larger you might want the size more than once. I also defined num
at the point of first use. I also added some extra vertical spacing to make it clearer, although I probably wouldn't so much in real code.
typedef char sentence[STR_LEN];
int main(int argc, char **argv)
{
char *article = {"the", "a", "one", "some", "any"};
const size_t n_articles = sizeof article /sizeof article[0];
char *noun = {"boy", "girl", "dog", "town", "car"};
const size_t n_nouns = sizeof noun /sizeof noun[0];
char *preposition = {"to", "from", "over", "under", "on"};
const size_t n_prepositions = sizeof preposition /sizeof preposition[0];
sentence sentences[MAX_SEN];
srand((unsigned) time(NULL));
for (int i = 0; i < MAX_SEN; ++i) {
int num = rand() % n_articles;
strcpy(sentences[i], article[num]);
num = rand() % n_nouns;
strcat(sentences[i], " ");
strcat(sentences[i], noun[num]);
num = rand() % n_prepositions;
strcat(sentences[i], " ");
strcat(sentences[i], preposition[num]);
printf("%s.n", sentences[i]);
}
return 0;
}
I can't really say there is anything wrong with your code although I really don't like the nested strcat
. There are some minor quibbles, such as the opening brace not being in column 0, the parameters missing from main and the stdlib include missing.
However I can offer some alternatives that are not necessarily better, just different. In the code below, I used a typedef to define a sentence type. To my eyes it is easier to handle one-D arrays (ie and array of sentences) that 2-D arrays. But that is just me. I also used a simple index in the loop rather than a pointer to the sentence. - seems more straightforward to me. And I put each array size into a const - in the code it doesn't matter but in something larger you might want the size more than once. I also defined num
at the point of first use. I also added some extra vertical spacing to make it clearer, although I probably wouldn't so much in real code.
typedef char sentence[STR_LEN];
int main(int argc, char **argv)
{
char *article = {"the", "a", "one", "some", "any"};
const size_t n_articles = sizeof article /sizeof article[0];
char *noun = {"boy", "girl", "dog", "town", "car"};
const size_t n_nouns = sizeof noun /sizeof noun[0];
char *preposition = {"to", "from", "over", "under", "on"};
const size_t n_prepositions = sizeof preposition /sizeof preposition[0];
sentence sentences[MAX_SEN];
srand((unsigned) time(NULL));
for (int i = 0; i < MAX_SEN; ++i) {
int num = rand() % n_articles;
strcpy(sentences[i], article[num]);
num = rand() % n_nouns;
strcat(sentences[i], " ");
strcat(sentences[i], noun[num]);
num = rand() % n_prepositions;
strcat(sentences[i], " ");
strcat(sentences[i], preposition[num]);
printf("%s.n", sentences[i]);
}
return 0;
}
answered Mar 15 '13 at 18:28
William Morris
8,7671241
8,7671241
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f23845%2frandom-sentences-generator%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown