Skip to content

Commit

Permalink
improved readability
Browse files Browse the repository at this point in the history
  • Loading branch information
Davy-jones-Giant-squid committed Mar 29, 2014
1 parent 1eba7ec commit fc17567
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions analyze.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ void printTableHeaders(){

printf("\n");
printf("Speech\n");
printf("YEAR\tWords\tSentences\tParagraphs\tAvg Word Length\tAvg Sentence Length(in words)");
printf("\t I\tI've\tI'll\tme\tmy\tmine\tmyself");
printf("\t we\twe've\twe'll\tus\tour\tours\tourselves\n");
printf("====\t-----\t---------\t----------\t---------------\t-----------------------------");
printf("\t---\t----\t----\t--\t--\t----\t------");
printf("\t --\t-----\t-----\t--\t---\t----\t---------\n");
printf("YEAR Words Sentences Paragraphs Avg Word Length Avg Sentence Length(in words)");
printf(" I I've I'll me my mine myself");
printf(" we we've we'll us our ours ourselves\n");
printf("==== ----- --------- ---------- --------------- -----------------------------");
printf(" -- ---- ---- -- -- ---- ------");
printf(" -- ----- ----- -- --- ---- ---------\n");
}

//Counts words, sentences, and paragraphs
Expand Down Expand Up @@ -159,15 +159,15 @@ void countAndPrintInfo(SPEECH_NUM speechNum[], int i, const char* fileName){
speechNum[i].wordCount++;

//Prints all acquired info
printf("%s\t %4d\t %3d\t\t%2d\t %f\t\t\t %f\t", speechYear,
printf("%s\t %4d\t %3d\t %2d\t\t %f\t\t\t %f\t", speechYear,
speechNum[i].wordCount, speechNum[i].sentenceCount,
speechNum[i].parCount, speechNum[i].avgWordLength,
speechNum[i].avgSentLength);
printf(" %2d\t %2d\t %2d\t%2d\t%2d\t %2d\t %2d\t", speechNum[i].iCount,
printf("%2d %2d %2d %2d %2d\t %2d\t %2d\t", speechNum[i].iCount,
speechNum[i].iveCount, speechNum[i].illCount,
speechNum[i].meCount, speechNum[i].myCount,
speechNum[i].mineCount, speechNum[i].myselfCount);
printf(" %2d\t %2d\t %2d\t%2d\t %2d\t %2d\t\t%d\n", speechNum[i].weCount,
printf(" %2d\t %2d\t %2d\t %2d\t %2d\t %2d\t %d\n", speechNum[i].weCount,
speechNum[i].weveCount, speechNum[i].wellCount,
speechNum[i].usCount, speechNum[i].ourCount,
speechNum[i].oursCount, speechNum[i].ourselvesCount);
Expand Down

0 comments on commit fc17567

Please sign in to comment.