#include "stdafx.h"
#include <stdio.h>
void main()
{
int str, str2, m, n, i, i2;
bool sw;
sw=true;
str = 1;
n=4;
m=5;
for(i=1;i<=n;i++)
{
for(i2=1;i2<=m;i2++)
{
if(sw)
printf(" %d ", str);
str+=1;
else
printf(" %d ", str2);
str+=1;
str2-=1;
}
printf("\n");
if(sw)
sw=false;
str2=str+4;
else
sw=true;
}
else위에있는거 한줄로 만드니까 에러없어지긴하는데 머가문제야?
if내용이랑 else내용이랑 대괄호로 묶어바
ㅇㅇ ㄳ