/*
1. 문자 2개 변수
2. 문자 2개 입력 받음
3. 소문자를 다른 변수에 저장해 둠
4. 소문자를 대문자로 바꿈
5. if문으로 알파벳 순서상 먼저 나오는 판별하여 출력함
6. else 대문자의 아스키코드가 소문자와 같거나 작은 경우 -> 대문자 출력
*/
#include <stdio.h>
int main() {
char a, b;
scanf("%c-%c", &a, &b);
char tmp = b;
b += ('A' - 'a');
if (a > b) {
printf("%c", tmp);
}
else {
printf("%c", a);
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: