Brace Styles
K&R:
if (total > 0) { printf( “Pay up!” );
total = 0;
} else {
printf( “Goodbye” );
}
non-K&R:if (total > 0){ printf("Pay up!"); total = 0 ;}else{ printf("Goodbye");}
Previous slide
Next slide
Back to first slide
View graphic version