조회 수 455 추천 수 0 댓글 0

#include <stdio.h>

int y()
{
	int a;
	scanf("%d",&a);
	int i;
	if(a%2==0){
		for(i=1; a>=i; i++){
	    	if(i%2==0) printf("%d ",i); 	
		}			
}
 	else
	for(i=1; a>=i; i++){
		if(i%2==1) printf("%d ",i);
	}
}
	 	
int main(void)
{
	y();



	return 0;
}