Á¤¼ºÈÆ
    hangman.c (±³Àç)
  http://itsys.hansung.ac.kr/cgi-bin/onlineTest/viewCcoding/onlineCcoding.cgi?source=src/chap10/hangman.c



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <conio.h>
#include <string.h>
 
int main(void) {
    char solution[100= "meet at midnight";    // Á¤´äÀÌ µé¾î Àִ ¹®ÀÚ ¹è¿­
    char answer[100= "____ __ ________";  // ÇöÀç±îÁö »ç¿ëÀÚ°¡ ¸ÂÃá ¹®ÀÚ¿­
    char ch;
    int i;      
        
    while (1) { 
        printf("\n¹®ÀÚ¿­À» ÀÔ·ÂÇϽÿÀ: %s \n", answer);
        printf("±ÛÀÚ¸¦ ÃßÃøÇϽÿÀ: "); 
        ch = _getch();
 
        // »ç¿ëÀÚ°¡ ÀÔ·ÂÇÑ ¹®ÀÚ¸¦ answer[]¿¡ ³Ö¾î¼­  Á¤´äÀ» ºñ±³ÇÑ´Ù.
        for (i = 0; solution[i] != '\0'; i++) {
 
            // »ç¿ëÀÚ°¡ ¸ÂÃß¾úÀ¸¸é ±ÛÀÚ¸¦ º¸ÀÌ°Ô ÇÑ´Ù.
            if (solution[i] == ch)
                answer[i] = ch;
        }
        if (strcmp(solution, answer) == 0break// Á¤´ä°ú ÀÏÄ¡ÇÏ´ÂÁö¸¦ °Ë»ç
    }
    return 0;
}
cs

  µî·ÏÀÏ : 2022-02-23 [00:30] Á¶È¸ : 623 ´Ù¿î : 0   
 
¡â ÀÌÀü±Ûanagram.c (±³Àç)
¡ä ´ÙÀ½±Ûchar_ptr.c (±³Àç)
ÇÁ·Î±×·¡¹Ö¾ð¾î ½Ç½À°Ô½ÃÆÇ
¹øÈ£ ¨Ï Á¦ ¸ñ Á¶È¸ µî·ÏÀÏ
lMini Project (¾îµåº¥Ã³ °ÔÀÓ ¸¸µé±â) Ãß°¡ ±¸Çö // ¡Ú¡Ú¡Ú ±â¸»°úÁ¦ °ÔÀÓ±¸Çö ½Ã Âü°í
l½Ç½À ¸ñÂ÷
221 ¦¦❶ lhangman.c (±³Àç) 623 02-23
220 ¦¦❶ lchar_ptr.c (±³Àç) 627 02-23
219 ¦¦❶ lcalc_quiz.c (±³Àç) 648 02-23
218 ¦¦❶ latoi.c (±³Àç) 722 02-23
217 ¦¦❶ lstrcmp.c (±³Àç) 790 02-23
216 ¦¦❶ lstrcat.c (±³Àç) 741 02-23
215 ¦¦❶ lstrcpy.c (±³Àç) 606 02-23
214 ¦¦❶ lstrlen.c (±³Àç) 639 02-23
213 ¦¦❶ lstringio2.c (±³Àç) 593 02-23
212 ¦¦❶ lstringio.c (±³Àç) 652 02-23
211 ¦¦❶ ltext_game.c (±³Àç) 709 02-23
210 ¦¦❶ lpassword.c (±³Àç) 664 02-23
209 ¦¦❶ l_getchar.c (±³Àç) 614 02-23
208 ¦¦❶ lgetchar.c (±³Àç) 612 02-23
207 ¦¦❶ lpre_string.c (±³Àç) 615 02-23
206 ¦¦❶ lstring3.c (±³Àç) 599 02-23
205 ¦¦❶ lstring2.c (±³Àç) 624 02-22
204 ¦¦❶ lstring1.c (±³Àç) 647 02-22
203 (9Àå) Æ÷ÀÎÅÍ 755 02-22
202 ¦¦❶ (9Àå) Æ÷ÀÎÅÍ ¼ö¾÷ ¼³¸í ¿¹Á¦ ÇÁ·Î±×·¥ 103 05-17

[1][2][3][4][5][6][7][8][9][10]-[Next][15]