a for loop, assuming there are multiple conditions (in other words, use brackets), or an if statment.. same thing.
Why am I asking, I want to see how you guys format it. I'm arguing w/ my TA who took off 4 points for my "style." yes, it's only 4 points, but it's a principle thing to me. I don't like it when I try to explain to the grader why I do what I do, and all they do after ANYTHING I say is point to my code and say "It needs more spaces"
Here's what I'd have:
for (i = 0; i < MAX; i++)
**{
**printf("yada"
**if (i < 4)
*****{
*****printf("This is stupid\n"
*****printf("%d\n", i);
*****}
**}
Using C for this example, but use whatever...
Why am I asking, I want to see how you guys format it. I'm arguing w/ my TA who took off 4 points for my "style." yes, it's only 4 points, but it's a principle thing to me. I don't like it when I try to explain to the grader why I do what I do, and all they do after ANYTHING I say is point to my code and say "It needs more spaces"
Here's what I'd have:
for (i = 0; i < MAX; i++)
**{
**printf("yada"
**if (i < 4)
*****{
*****printf("This is stupid\n"
*****printf("%d\n", i);
*****}
**}
Using C for this example, but use whatever...