#include void initScreen() { printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); printf("Welcome to Bubbler, the Automated CAPA grader.\n"); printf("By: Guy Albertelli II\n"); printf("Version 0.10.00\n\n\n"); } void getClassInfo(char* class,int* setId) { printf("What is the class name?"); scanf("%s",class); printf("What is the SetId?"); scanf("%d",setId); } /*errr Guy this all needs some major thought put into it*/ void openOutputFile(filename[80], Questions questions[MAXQUEST],char* class, int setId,char problem) { FILE *outputFile=fopen(filename,"r+"); /*File already exists*/ if (outputFile != NULL) { rewind(outputFile); /*read in the first line with problem description etc.*/ fscanf(outputFile,"%s",buf); } /*File doesn't exist or is empty*/ if (outputFile==NULL || buf[0]=='\0') { outputFile=fopen(filename,"w+"); if (outputFile==NULL) { fprintf(stderr,"Unable to open the output file %s",filename); exit(10); } fprintf(outputFile,"%s %d ",class,setId); for(i=0;iCompareClassName=0; else flags->CompareClassName=1; printf("Should the PIN be checked? (y or n)"); scanf("%s",clear); if (clear[0]=='N' || clear[0]=='n') flags->CheckPIN=0 else { CheckPIN=1; printf("Should we run in Anonymous mode?"); scanf("%s",clear); if (clear[0]=='N' || clear[0]=='n') Anon=0; else Anon=1; } } int main(void) { initScreen(); getClassInfo(); getProblemInfo(); setupScantron(); processForms(); closeScantron(); return 0; }