请简述下面两个for循环的优缺点
for(i = 0; i < N; i++)
{
if(condition)
DoSomething();
else
DoOtherthing();
}
///////////////////////////////////////////////////////////////////
if(condition)
{
for(i = 0; i < N; i++)
DoSomething();
}
else
{
for(i = 0; i < N; i++)
DoOtherthing();
}