1581, 2/80 ȸ¿ø°¡ÀÔ  ·Î±×ÀΠ 
   ¼Ò¿ï
   http://souldesign.pe.kr
   [ÀÚÀÛ] [C¹®Á¦] ´ë¼Ò¹®ÀÚ ¹Ù²Ù±â

http://www.hackerschool.org/HS_Boards/zboard.php?id=Free_Lectures&no=1441 [º¹»ç]


[switch_upper_lower.c]

Q. ¾ËÆĺªÀ» ÀÔ·Â¹Þ¾Æ ´ë¹®ÀÚ´Â ¼Ò¹®ÀÚ·Î, ¼Ò¹®ÀÚ¸¦ ´ë¹®ÀÚ·Î º¯È¯ÇÏ¿© Ãâ·ÂÇ϶ó.

<ÀÔ/Ãâ·Â ¿¹>
Enter alphabets : aBcDeF
AbCdEf


A. ¿¹Á¦ ¼Ò½º

#include <stdio.h>
#include <string.h>

int main(void) {
        char txt[255];

        while(1) {
                printf("%s", "Enter alphabets : ");
                fgets(txt, sizeof(txt), stdin); //fgets¸¦ ÀÌ¿ëÇÏ¿© txt¿¡ Ç¥ÁØÀÔ·ÂÀ» ¹ÞÀ½
                
                int i;
                for(i=0; i<strlen(txt)-1; i++) { //txtÀÇ ±æÀÌ - 1(³Î¹®ÀÚ)¸¸Å­ ·çÇÁ
                        char ch = txt[i]; //txtÀÇ i¹ø° ¹®ÀÚ¸¦ ch¿¡ ´ëÀÔ
                        
                        if(ch >= 97 && ch <= 122) //ch°¡ ¼Ò¹®ÀÚÀÏ °æ¿ì
                                txt[i] -= 32; //txtÀÇ i¹ø° ¹®ÀÚ - 32

                        if(ch >= 65 && ch <= 90) //ch°¡ ´ë¹®ÀÚÀÏ °æ¿ì
                                txt[i] += 32; //txtÀÇ i¹ø° ¹®ÀÚ + 32
                                
                }

                printf("%s", txt);
        }


        return 0;
}

  Hit : 7184     Date : 2010/03/20 06:02



    
Myers ¤»¤»¤» °Á toupperÇÔ¼öÇÏ°í tolower ÇÔ¼ö »ç¿ëÇϽÃÁö... 2010/03/21  
¼Ò¿ï Myers//±×·±°Íµµ ÀÖ±º¿ä ;;;;; 2010/03/21  
Cpgroot °¨»çÇÕ´Ï´Ù. 2010/08/18  
1561   À©µµ¿ì¿¡¼­ grep »ç¿ëÇϱâ[3]     ¼Û½Ã
11/05 8326
1560   IP ¿Í PORT[8]     ¼Û½Ã
11/02 10022
  [ÀÚÀÛ] [C¹®Á¦] ´ë¼Ò¹®ÀÚ ¹Ù²Ù±â[3]     ¼Ò¿ï
03/20 7183
1558   [ÀÚÀÛ] [C¹®Á¦] ¼Ò¼ö¸¸ °É·¯³»±â[2]     ¼Ò¿ï
03/20 7964
1557   [ÀÚÀÛ] [C¹®Á¦] Á¡(.)À» »« ¹®ÀÚ Ãâ·ÂÇϱâ[1]     ¼Ò¿ï
03/20 6767
1556   [ÀÚÀÛ] À©µµ¿ì cmd ÆÁ - º¹»çÇϱâ[7]     ¼Ò¿ï
03/01 9164
1555   [ÀÚÀÛ] FTZ Æ®·¹ÀÌ´× 1~10±îÁö °£´ÜÇÏ°Ô Á¤¸®[14]     ¼Ò¿ï
03/01 14955
1554   Format String Attack - Concept and General Exploit (by Seo SungHyen)[6]     ¼ÒÀ¯
07/07 11423
1553   ¹öÆÛ¿À¹öÇ÷οì by ¿ÀÇ϶ó[3]     ¼ÒÀ¯
07/07 15257
1552   Overflow °ø°Ý ±â¹ýµé¿¡ ´ëÇÑ Á¤¸® by ¹ö½ºÆ®     ¼ÒÀ¯
07/07 15699
1551   ¿Ö C À̾î¾ß Çϴ°¡ ?[96]     ¼ÒÀ¯
04/09 24889
1550   ÀÎÅͳݿ¡ ¸®´ª½º ¼­¹ö ±¸ÃàÇϱâ[1]     ¼ÒÀ¯
07/07 14745
1549   [Àâ] ³×Æ®¿öÅ© TCP[8]     ¼ÒÀ¯
10/31 9115
1548   [Àâ] ³×Æ®¿öÅ© IP[5]     ¼ÒÀ¯
11/01 10100
1547   ¸®´ª½º ¼³Ä¡Çϱâ - RPMÆí[3]     ¼ÒÀ¯
10/09 9578
1546   ¸®´ª½º ¼³Ä¡Çϱâ - ½©Æí[2]     ¼ÒÀ¯
10/07 9622
1545   ¾ÕÀ¸·Î À̾îÁú ±Û¿¡ ´ëÇؼ­.....[2]     ¼ÒÀ¯
10/06 8459
1544   ¸®´ª½º ¼³Ä¡Çϱâ - µð·ºÅ丮Æí     ¼ÒÀ¯
10/06 9263
1543   ¸®´ª½º ¼³Ä¡Çϱâ - ÆÄƼ¼ÇÆí[6]     ¼ÒÀ¯
10/06 9491
1542   ¸®´ª½º ¼³Ä¡Çϱâ - ÆÁÆí     ¼ÒÀ¯
10/06 8852
[1] 2 [3][4][5][6][7][8][9][10]..[80]

Copyright 1999-2024 Zeroboard / skin by Hackerschool.org / Secure Patch by Hackerschool.org