top of page

소스 코드 제출

공개·회원 50명

2025 05 03 [아스키 코드]

/*

2721 : 순환 문자열 |해결|

#include <stdio.h>

#include <string.h>

int main()

{

char S1[21]={},S2[21]={},S3[21]={};

int i,c,cn,cnt;

scanf("%s %s %s",S1,S2,S3);

c=strlen(S1);

cn=strlen(S2);

cnt=strlen(S3);

if(S1[c-1]==S2[0] && S2[cn-1]==S3[0] && S3[cnt-1]==S1[0])

{

printf("good");

}

else

{

printf("bad");

}

return 0;

}

*/

/*

1419 : love 2 |해결|

#include <stdio.h>

#include <string.h>

int main()

{

char str[101]={};

int i,s=0;

gets(str);

for(i=0 ; str[i]!=NULL ; i++)

{

if(str[i]=='l' && str[i+1]=='o' && str[i+2]=='v' && str[i+3]=='e')

{

s++;

}

}

printf("%d",s);

return 0;

}

*/

/**

아스키코드 ASCII CODE : 모든 문자는 고유의 코드넘버가 있따!

>> American Standard Communication Information Interchange

미국의 표준 통신 정보 교환


NULL 0


' ' 32


'0' 48

'1' 49

'2' 50

...


'9' 57


'A' 65

'B' 66

...

'Z'


'a' 97

'b' 98

...

'z'


*/

/*

#include <stdio.h>

#include <string.h>

int main()

{

//printf("%c의 아스키코드 : %d",'a','a');


// printf("%c",33);

// if(str[i]=='t') (ok)

// if(str[i]==116) (ok)

//

// if(97<=str[i] && str[i]<=122) (ok)

// if('a'<=str[i] && str[i]<='z') (ok)



// printf("%c",'r'-('a'-'A'));

return 0;

}

*/

/*

1295 : 알파벳 대소문자 변환 |해결|

#include <stdio.h>

#include <string.h>

int main()

{

char str[1001]={};

int i;

scanf("%s",str);

for(i=0 ; str[i]!=NULL ; i++)

{

if(65<=str[i] && str[i]<=90)

{

printf("%c",str[i]+32);

}

else if(97<=str[i] && str[i]<=122)

{

printf("%c",str[i]-32);

}

else

{

printf("%c",str[i]);

}

}

return 0;

}

*/

/*

1408 : 암호 처리 |해결|

#include <stdio.h>

#include <string.h>

int main()

{

char str[21]={};

int i;

scanf("%s",str);

for(i=0 ; str[i]!=NULL ; i++)

{

printf("%c",str[i]+2);

}

printf("\n");

for(i=0 ; str[i]!=NULL ; i++)

{

printf("%c",(str[i]*7)% 80 + 48);

}

return 0;

}

*/


/**


scanf("%s",str);

s[0] s[1] s[2] s[3] s[4] ...

'3' '3' '2' '1' NULL ...


s[0] + s[1] + s[2] +s[3] (x)

= '3' + '3' + '2' + '1' (x)

= 51 + 51 + 50 + 49 (x)



3 + 3 + 2 + 1 (o)


*/

#include <stdio.h>

#include <string.h>

int main()

{

char str[501]={};

int i,n;

scanf("%s",str);

for(i=0 ; str[i]!=NULL ; i++)

{

}

}

1회 조회
주소 : 경기도 용인시 광교중앙로 302 블루 스퀘어 602호
연락처 : 031) 216 - 1546 ,     031) 215 - 1546
사업자등록번호 : 465-92-00916
​학원 등록 제 4603호
bottom of page