/****************************************************************************** * typewriter.c * CSCI E-52 * Matthew Chartier * * Worst. Text Editor. Ever. *****************************************************************************/ #include #include #include int main(int argc, char *argv[]) { FILE *paper = fopen("finestationary.txt", "w"); if (paper == NULL) { printf("Could not open file.\n"); return 1; } string input; while(true) { input = GetString(); if (strcmp(input, "exit") == 0) { fclose(paper); return 0; } else { fputs(input, paper); fputs("\n", paper); printf("buh-duh-ruh-CHING!\n"); } } }