소개글
자료구조 2장 연습문제 9번의 random walk 문제입니다.
Fundamentals of Data Structures
컴파일 실행환경
C 소스 파일입니다.
본문내용
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
typedef struct{
short int vert;
short int horiz;
}offsets;
void main()
{
int mat[22][22]={0, };
offsets move[8]={{-1,1},{0,1},{1,1},{1,0},{1,-1},{0,-1},{-1,-1},{-1,0}};
int xbug, ybug;//현재위치
참고 자료
없음