src/chap01/hello.c
src/chap02/hello.c
src/chap02/hello1.c
src/chap02/hello2.c
src/chap02/gugu.c
src/chap02/gugu_for.c
src/chap02/add1.c
src/chap02/add2.c
src/chap02/error.c
src/chap02/calculation.c
src/chap03/overflow.c
src/chap03/int_const.c
src/chap03/dollar2won.c
src/chap03/property.c
src/chap03/swap.c
src/chap03/floating.c
src/chap03/over_under.c
src/chap03/float_error.c
src/chap03/sunlight.c
src/chap03/temperature.c
src/chap03/circle_area.c
src/chap03/char_var.c
src/chap03/char_var1.c
src/chap03/get_ascii.c
src/chap03/escape.c
src/chap04/arithmetic1.c
src/chap04/arithmetic2.c
src/chap04/modulo.c
src/chap04/incdec.c
src/chap04/days.c
src/chap04/bending.c
src/chap04/comp_op.c
src/chap04/relational.c
src/chap04/bit_op.c
src/chap04/bit_shift.c
src/chap04/bit_operator.c
src/chap04/prec.c
src/chap04/typecast.c
src/chap04/cal_quad_eq.c
src/chap05/if_else1.c
src/chap05/if_else2.c
src/chap05/if_else3.c
src/chap05/condition.c
src/chap05/check_number.c
src/chap05/coin.c
src/chap05/leap_year.c
src/chap05/grade.c
src/chap05/calc1.c
src/chap05/largest.c
src/chap05/switch.c
src/chap05/days_in_month.c
src/chap05/check_cond.c
src/chap05/check_tri.c
src/chap05/quad_eqn.c
src/chap05/print_temp.c
src/chap06/mile1.c
src/chap06/teacher.c
src/chap06/while1.c
src/chap06/mile2.c
src/chap06/factorial.c
src/chap06/gugu.c
src/chap06/sum.c
src/chap06/paper.c
src/chap06/clock.c
src/chap06/menu.c
src/chap06/game.c
src/chap06/ndigits.c
src/chap06/sum(for).c
src/chap06/draw_box.c
src/chap06/factorial(for).c
src/chap06/interest.c
src/chap06/divisor.c
src/chap06/harmony.c
src/chap06/nest_loop2.c
src/chap06/gugu_tot.c
src/chap06/break.c
src/chap06/continue.c
src/chap06/math.c
src/chap06/get_prime.c
src/chap06/calc_pi.c
src/chap07/score1.c
src/chap07/code.c
src/chap07/score2.c
src/chap07/score5.c
src/chap07/att_book.c
src/chap07/get_min.c
src/chap07/search.c
src/chap07/bubble.c
src/chap07/draw_bubble.c
src/chap07/two_dim.c
src/chap07/matrix.c
src/chap08/print_name1.c
src/chap08/print_name2.c
src/chap08/func1.c
src/chap08/get_max.c
src/chap08/power.c
src/chap08/prototype.c
src/chap08/temp.c
src/chap08/check_prime.c
src/chap08/local_var.c
src/chap08/global_var.c
src/chap08/local_shadow.c
src/chap08/prime_sum.c
src/chap08/static.c
src/chap08/factorial.c
src/chap09/address_of.c
src/chap09/pointer1.c
src/chap09/pointer2.c
src/chap09/pointer_arith1.c
src/chap09/call_by_value.c
src/chap09/call_by_ref.c
src/chap09/swap1.c
src/chap09/swap2.c
src/chap09/p_array1.c
src/chap09/p_array2.c
src/chap09/p_func.c
src/chap10/string1.c
src/chap10/string2.c
src/chap10/string3.c
src/chap10/pre_string.c
src/chap10/getchar.c
src/chap10/_getchar.c
src/chap10/password.c
src/chap10/text_game.c
src/chap10/stringio.c
src/chap10/stringio2.c
src/chap10/strlen.c
src/chap10/strcpy.c
src/chap10/strcat.c
src/chap10/strcmp.c
src/chap10/atoi.c
src/chap10/calc_quiz.c
src/chap10/char_ptr.c
src/chap10/hangman.c
src/chap10/anagram.c
src/chap10/array_of_string.c
src/chap10/dic.c
src/chap10/str_sort.c
src/chap11/student1.c
src/chap11/struct_init.c
src/chap11/point.c
src/chap11/array_of_struct.c
src/chap11/multiple_choice.c
src/chap11/vector.c
src/chap11/pointer_to_st.c
src/chap11/union.c
src/chap11/enum1.c
src/chap11/typedef.c
src/chap12/file_open.c
src/chap12/fputs.c
src/chap12/fgetc.c
src/chap12/fgets.c
src/chap12/fcopy1.c
src/chap12/fprintf.c
src/chap12/score3.c
src/chap12/binary1.c
src/chap12/binary2.c
src/chap12/imagedisp.c
src/chap12/fseek1.c
src/chap12/fseek2.c
src/chap13/malloc1.c
src/chap13/malloc2.c
src/chap13/dyn_array.c
src/chap13/dyn_array2.c
src/chap13/malloc4.c
src/chap13/dyn_struct.c
src/chap14/macro_lab1.c
src/chap14/macro1.c
src/chap14/bit_macro.c
src/chap14/macro3.c
src/chap14/func_macro.c
¢¸ ÀÌÀü
´ÙÀ½ ¢º
#include
#include
#include
int main(void) { char board[10][10] = { {'#', '#', '#', '#', '.', '.', '.', '.', '.', '.' }, {'.', '.', '.', '.', '.', '#', '.', '.', '.', '.' }, {'#', '#', '#', '.', '#', '.', '.', '.', '.', '.' }, {'.', '.', '#', '.', '.', '#', '.', '.', '.', '.' }, {'.', '.', '#', '.', '.', '#', '.', '.', '.', '.' }, {'.', '.', '#', '.', '.', '#', '.', '.', '.', '.' }, {'.', '.', '.', '#', '.', '.', '#', '#', '.', '.' }, {'.', '.', '.', '.', '#', '.', '.', '.', '#', '#' }, {'.', '.', '.', '.', '.', '#', '.', '.', '.', '.' }, {'.', '.', '.', '.', '.', '#', '#', '#', '#', '#' } }; int xpos = 0, ypos = 1; board[ypos][xpos] = '@'; // »ç¿ëÀڷκÎÅÍ À§Ä¡¸¦ ¹Þ¾Æ¼ º¸µå¿¡ Ç¥½ÃÇÑ´Ù. while (1) { system("cls"); printf("¿ÞÂÊÀ̵¿:<-, ¿À¸¥ÂÊ À̵¿:-> À§ÂÊ À̵¿:^, ¾Æ·¡ÂÊ À̵¿:V\n"); for (int y = 0; y < 10; y++) { for (int x = 0; x < 10; x++) printf("%c", board[y][x]); printf("\n"); } board[ypos][xpos] = '.'; int ch = _getch(); if (ch == 224) { int ch2 = _getch(); if (ch2 == 75) xpos--; else if (ch2 == 80) ypos++; else if (ch2 == 72) ypos--; else if (ch2 == 77) xpos++; } board[ypos][xpos] = '@'; } return 0; }