반응형
알파벳 대문자/소문자 판별하기
#include<stdio.h>
int main(void){
char ch;
scanf("%c", &ch);
if(ch >= 'A' && ch <= 'Z') // if(65 <= ch <= 90)
printf("%c is a big letter.\n", ch);
return 0;
}
반응형
'C' 카테고리의 다른 글
[C언어] 실습: 배열에서 같은 값 찾기 (0) | 2021.06.28 |
---|---|
[C언어] 실습: 홀수/짝수 숫자 판단하기 (if문) (0) | 2021.06.27 |
[C언어] 비트 연산 (Letter Attribute) (0) | 2021.06.24 |
[C언어] 실습: 윤년(Leap Year) 판별하기 (조건식) (0) | 2021.06.23 |
[C언어] 실습: 윤년(Leap Year) 판별하기 (0) | 2021.06.21 |