Please write all your source code in this course
using the K&R style.
The K&R style defines where to place curly-braces
and how to indent.
--------------------------------------------------------------------
Sample from wikipedia
int main(int argc, char *argv[])
{
...
while (x == y) {
something();
somethingelse();
if (some_error)
do_correct();
else
continue_as_usual();
}
finalthing();
...
}
--------------------------------------------------------------------
Example of if-else
if (variable < 100) {
variable = 100;
} else {
variable *= 0.99;
}
--------------------------------------------------------------------
The major components of good style in this course...
Be consistent with your use of curly-braces.
Do not mix tabs and spaces together for indenting.
Do not let lines wrap on an 80-character window.