// place your name and other information here // this can include class, section, assignment #, date, etc // place an introductory comment here that describes what your program does. this should // have some detail including any peculiar aspects of the assignment or program. a // programmer should be able to read this comment and understand what your program does and // how. // place your #include statements here #include // place your prototypes here if necessary (we cover this later in the semester) // the main function can be void or int, your choice, I prefer void void main() { // declare your variables first (in C, you cannot intersperse variable declarations and // executable statements. All variable declarations should be commented -- what is the variable used for? // unless the variable's name describes its use // NOTE: you can initialize variables to values when you declare them, but only if the initialization // is of a literal value, not a function call, e.g., int x = 0; is fine but FILE *fp=fopen(...); is not // executable statements will go here. Logic should be commented, particularly loops and selection statements // -- what does the loop do? what are you trying to accomplish with your code? } // if you have other functions, they should be listed here. Note that since these come after // main, you must include function prototypes above (this will be explained later in the // semester) // every function should have an introductory comment explaining its role in the program: // what it does, how it works, whats its input and output are (in terms of parameters) // in addition, each function's logic should be commented as needed (for instance, // describe the role of an if-else statement or a loop).