Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

improved readability

  • Loading branch information...
commit fc17567a61d125bd82855fb1521d40d8c77d871c 1 parent 1eba7ec
Davy-jones-Giant-squid authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 analyze.cpp
View
18 analyze.cpp
@@ -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
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.