CMSC104 - Indentation Styles

Choose one of the two styles and use it consistently:

Student Style Bell Labs Style
if (condition)
{
   statement(s)
}
		
if (condition) {
   statement(s)     
}        
		
if (condition)
{
   statement(s)
}
else if (condition)
{  
   statement(s)
}
else
{
   statement(s)
}
		
if (condition) {
   statement(s)
} else if (condition) {  
   statement(s) 
} else {
   statement(s)
}
for (loop control expressions)
{
   statement(s)
}
for (loop control expressions) {
   statement(s)
}
while (condition)
{
   statement(s)
}
while (condition) {
   statement(s)
}
do
{
   statement(s)
} while (condition);
do {
   statement(s)
} while (condition);
switch (expression)
{
   case value1:
       statement(s)
   case value2:
       statement(s)
   default:
       statement(s)
}
	      
switch (expression) {
   case value1:
       statement(s)
   case value2:
       statement(s)
   default:
       statement(s)
}